How to fix "SNMP error" problem?

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
ar0s0
Posts: 2
Joined: Mon Feb 13, 2006 6:05 am

How to fix "SNMP error" problem?

Post by ar0s0 »

After saving your new device, you should be redirected back to the same edit form with some additional information. If you configured SNMP for this host by providing a valid community string, you should see various statistics listed at the top of the page. If you see "SNMP error" instead, this indicates an SNMP problem between Cacti and your device.

How to fix "SNMP error" problem?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

By enabling snmp for the target device! If it is enabled, perhaps a firewall blocks port 161. Or a mistake with the community string? Some snmp agents allow for filters ...
To check, please run

Code: Select all

snmpwalk -c <your community string> -v 1 <target> system
If this succeeds, you're prepared for graphing with cacti
Reinhard
ar0s0
Posts: 2
Joined: Mon Feb 13, 2006 6:05 am

Post by ar0s0 »

I am sorry.
"SNMP error" show because I forget run snmpd.
:">

Now, I can create graph. But they do not contain any data.
I try
<code>php poller.php</code>
and setting my crontab on root user linux box.
But data file on directory cacti/rra can not refresh.
When I refresh manualy with
<code>php poller.php</code>
The graph show same, no contain any data.
Please help me.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Running the poller as root may introduce some problems. When doing so, rrd files that are created will have root as owner. If crontab spawns the poller as cactiuser, this will usually fail due to permission problems.
Please double check, that the user running the poller has write access to the directories log/ and rra/ and all files within!
Please give us a copy of your crontab and a directory listing of the rra/ directory.
Reinhard
apertyx1
Posts: 4
Joined: Tue Feb 14, 2006 3:33 pm

similar problem

Post by apertyx1 »

I am getting the same error.

snmpwalk returns system info OK

I'm pretty new and don't undertsand the reference to running snmpd mentioned above

Thanks
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: similar problem

Post by gandalf »

apertyx1 wrote:I am getting the same error.

snmpwalk returns system info OK

I'm pretty new and don't undertsand the reference to running snmpd mentioned above

Thanks
So, as said above, please give us a copy of your crontab and a directory listing of the rra/ directory.
Reinhard
apertyx1
Posts: 4
Joined: Tue Feb 14, 2006 3:33 pm

Post by apertyx1 »

cacti:/usr/share/cacti/site/rra# ls -la
total 632
drwxrwx--- 2 1000 www-data 4096 Feb 14 14:00 .
drwxr-xr-x 3 root root 4096 Jan 18 06:44 ..
-rw-r--r-- 1 root root 141484 Feb 15 08:20 localhost_load_1min_5.rrd
-rw-r--r-- 1 www-data www-data 141484 Feb 15 08:35 localhost_load_1min_8.rrd
-rw-r--r-- 1 root root 141484 Feb 15 08:20 localhost_load_1min_9.rrd
-rw-r--r-- 1 root root 47836 Feb 15 08:20 localhost_mem_buffers_3.rrd
-rw-r--r-- 1 root root 47836 Feb 15 08:25 localhost_mem_swap_4.rrd
-rw-r--r-- 1 root root 47836 Feb 15 08:20 localhost_proc_7.rrd
-rw-r--r-- 1 root root 47836 Feb 15 08:20 localhost_users_6.rrd
cacti:/usr/share/cacti/site/rra# cd ../log
log logout.php
cacti:/usr/share/cacti/site/rra# cd ../log
cacti:/usr/share/cacti/site/log# ls -la
total 80
drwxr-xr-x 2 1000 www-data 4096 Feb 14 06:26 .
drwxr-xr-x 11 root root 4096 Feb 15 06:26 ..
-rw-r----- 1 www-data www-data 57948 Feb 15 08:34 cacti.log
-rw-r----- 1 www-data www-data 3069 Feb 14 06:26 cacti.log.1.gz
-rw-r----- 1 1000 www-data 975 Feb 9 14:26 cacti.log.2.gz
-rw-r----- 1 1000 www-data 0 Jan 18 06:44 rrd.log
cacti:/usr/share/cacti/site/log# crontab -l
*/5 * * * * /usr/share/cacti/site/poller.php
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

apertyx1 wrote:cacti:/usr/share/cacti/site/rra# ls -la
total 632
drwxrwx--- 2 1000 www-data 4096 Feb 14 14:00 .
drwxr-xr-x 3 root root 4096 Jan 18 06:44 ..
-rw-r--r-- 1 root root 141484 Feb 15 08:20 localhost_load_1min_5.rrd
-rw-r--r-- 1 www-data www-data 141484 Feb 15 08:35 localhost_load_1min_8.rrd
-rw-r--r-- 1 root root 141484 Feb 15 08:20 localhost_load_1min_9.rrd
-rw-r--r-- 1 root root 47836 Feb 15 08:20 localhost_mem_buffers_3.rrd
-rw-r--r-- 1 root root 47836 Feb 15 08:25 localhost_mem_swap_4.rrd
-rw-r--r-- 1 root root 47836 Feb 15 08:20 localhost_proc_7.rrd
-rw-r--r-- 1 root root 47836 Feb 15 08:20 localhost_users_6.rrd
cacti:/usr/share/cacti/site/rra# cd ../log
log logout.php
cacti:/usr/share/cacti/site/rra# cd ../log
cacti:/usr/share/cacti/site/log# ls -la
total 80
drwxr-xr-x 2 1000 www-data 4096 Feb 14 06:26 .
drwxr-xr-x 11 root root 4096 Feb 15 06:26 ..
-rw-r----- 1 www-data www-data 57948 Feb 15 08:34 cacti.log
-rw-r----- 1 www-data www-data 3069 Feb 14 06:26 cacti.log.1.gz
-rw-r----- 1 1000 www-data 975 Feb 9 14:26 cacti.log.2.gz
-rw-r----- 1 1000 www-data 0 Jan 18 06:44 rrd.log
cacti:/usr/share/cacti/site/log# crontab -l
*/5 * * * * /usr/share/cacti/site/poller.php
So your poller runs as user cacti? Or as user www-data? In each case chown your rrd files and the rra/ directory to that user or updates will fail. I recommoend changing the cron entry to

Code: Select all

*/5 * * * * /usr/share/cacti/site/poller.php > /usr/share/cacti/site/log/poller.log 2>&1
So, the last pollers output can be found at log/poller.log. If rrdtool update errors occur, you should see them in that log file.
Reinhard
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

Hi,

I have the same problem with a new installation. snmpwalk works fine, graphs are created and the device is beeing polled.
But Console->Device->"device" shows "SNMP ERROR".

I copied the installed php etc. files from the cacti directory to an other machine and there seems to be all ok.

Torsten
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

torstentfk wrote:Hi,

I have the same problem with a new installation. snmpwalk works fine, graphs are created and the device is beeing polled.
But Console->Device->"device" shows "SNMP ERROR".

I copied the installed php etc. files from the cacti directory to an other machine and there seems to be all ok.

Torsten
Please double check the paths configured under Settings. And check execution permission for cactiuser on that files (e.g. snmpget, snmpwalk, ...)
Reinhard
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

Hi,

Code: Select all

drwxr-xr-x    2 root     root         4096 Jan 31 13:36 bin
ll bin
-rwxr-xr-x    1 root     root        17944 Jan 31 13:36 snmpwalk
-rwxr-xr-x    1 root     root        16105 Jan 31 13:36 snmpbulkget
-rwxr-xr-x    1 root     root        17984 Jan 31 13:36 snmpbulkwalk
Checked also path setting. The strange thing is that all graphs are working, interface description is ok.

Torsten
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Is php-snmp support available? Click on the "cacti" on the left side when activating the console tab. It will tell you whether php snmp support is activated
Reinhard
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

lvm wrote:Is php-snmp support available? Click on the "cacti" on the left side when activating the console tab. It will tell you whether php snmp support is activated
Reinhard
Hi,

yes, it is enabled.

Torsten
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests