pythonsnmpnet-snmpcacti

Cacti SNMP - Getting "value: U" although there is a value available


I've followed the guide on the following forum to get postfix logs graphed in cacti: http://forums.cacti.net/viewtopic.php?f=12&t=6657

(See the fifth post)

The installation steps on the post is as follows:

1) Configure SNMP agent on Mail server and make sure it is set up right.

2) Unzip fetch_mail_statistics.pl script in place of your choice. (I used /usr/local/bin)

3) Check that your perl path in script points to perl executable

4) Add following line in snmpd.conf file Code: pass .1.3.6.1.4.1.2021.255 /usr/local/bin/fetch_mail_statistics.pl /var/log/mail.log /var/log/mailstats.db .1.3.6.1.4.1.2021.255

5) Adjust your maillog filename and path corresponding to your system. mailstats.db are used for internal script data storage, place it anywhere. 6) Import template in cacti.

When I run the following command from the terminal, I'm able to get values and graph postfix in cacti:

/usr/local/bin/fetch_mail_statistics.pl /var/log/mail.log /var/log/mailstats.db .1.3.6.1.4.1.2021.255 -g .1.3.6.1.4.1.2021.255.9

Although when I added the the configuration to snmp.conf (See step 4) I'm only getting "value: U" and nAn in cacti.

I've checked permissions and I ran the script manually as the snmp-user (sudo -u snmp "code-here") without problems. We graph other stuff which works so there aren't any configuration problems with snmp or cacti.


Solution

    1. Go to Data templates
    2. Locate the Data template
    3. Check that the Maximum is not set lower than the value you get.
    4. If so change it to 1 trillion or any suitable max.