BIND 9 Statistics for Cacti

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
User avatar
Maillon
Posts: 16
Joined: Wed Jul 04, 2007 4:34 am
Location: Paris

Post by Maillon »

Hi Rossco ^^


About the associated graph query i believe why i had something : in fact i had created a new "Host Template" and i had associated the "Bind SNMP Request" and this graph (see the screen shot)

http://img223.imageshack.us/img223/5343 ... ateia4.jpg

Now i have deleted the "associated graph templates".

When i'm going to "Collection Methods" -> "Data Input Methods" -> "Bind9 SNMP Request" (i have created it) i have :

http://img408.imageshack.us/img408/5212 ... hodpf7.jpg


In fact when i launch this command i have this :

Code: Select all

poseidon:/data/www/cacti# php poller.php |grep cerbere

07/19/2007 11:25:56 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /data/www/cacti/rra/cerbere_proc_1064.rrd --template proc 1184837145:74
07/19/2007 11:25:56 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /data/www/cacti/rra/cerbere_traffic_in_1065.rrd --template traffic_in:traffic_out 1184837145:352990849:4185376659
07/19/2007 11:25:59 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /data/www/cacti/rra/cerbere_mem_buffers_1057.rrd --template mem_buffers 1184837158:3492
07/19/2007 11:25:59 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /data/www/cacti/rra/cerbere_mem_swap_1058.rrd --template mem_swap 1184837158:539380
07/19/2007 11:25:59 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /data/www/cacti/rra/cerbere_cpu_nice_1059.rrd --template cpu_nice 1184837158:17562
07/19/2007 11:26:00 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /data/www/cacti/rra/cerbere_cpu_system_1060.rrd --template cpu_system 1184837158:3173018
07/19/2007 11:26:00 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /data/www/cacti/rra/cerbere_cpu_user_1061.rrd --template cpu_user 1184837158:2199267
07/19/2007 11:26:00 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /data/www/cacti/rra/cerbere_load_1min_1062.rrd --template load_1min:load_5min:load_15min 1184837158:1.21:0.41:0.19
07/19/2007 11:26:00 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /data/www/cacti/rra/cerbere_users_1063.rrd --template users 1184837158:1
07/19/2007 11:26:00 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /data/www/cacti/rra/cerbere_proc_1064.rrd --template proc 1184837158:72
07/19/2007 11:26:00 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /data/www/cacti/rra/cerbere_traffic_in_1065.rrd --template traffic_in:traffic_out 1184837158:352997568:4185382647

I don't have my .rrd file (it's normally cerbere_snmp_ ...). So the poller doesn't work with the new host... but why ?
Where the poller see to create or update his .rrd file ?


And when i going to "System"->"System Utilities"->"Rebuild poller cache" i don't have my host.

http://img256.imageshack.us/img256/6671 ... chemu2.jpg


This can help you ?

PS : when I check /var/log/apache2/error.log getting :
ERROR: opening '/data/www/cacti/rra/cerbere_snmp_referral_1120.rrd': No such file or directory


Thank you.
User avatar
Maillon
Posts: 16
Joined: Wed Jul 04, 2007 4:34 am
Location: Paris

Post by Maillon »

Hi Rossco ^^,

So i progress ^^

I have launched /data/www/cacti/rebuild_poller.cache.php and now when i going to "System"->"System Utilities"->"Rebuild poller cache" i have :

http://img225.imageshack.us/img225/9136 ... letvr0.jpg

And I have graphs but it looks like that :

http://img341.imageshack.us/img341/9619 ... nannm3.jpg

In my cacti log on website i have lines seems that :

Code: Select all

 07/19/2007 02:53:17 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='1121' and rrd_name='success' and time='2007-07-19 14:53:14'"
07/19/2007 02:53:17 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='1121' and rrd_name='referral' and time='2007-07-19 14:53:14'"
07/19/2007 02:53:17 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='1121' and rrd_name='recursion' and time='2007-07-19 14:53:14'"
07/19/2007 02:53:17 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='1121' and rrd_name='nxrrset' and time='2007-07-19 14:53:14'"
07/19/2007 02:53:17 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='1121' and rrd_name='nxdomain' and time='2007-07-19 14:53:14'"
07/19/2007 02:53:17 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='1121' and rrd_name='failure' and time='2007-07-19 14:53:14'"

It's normal that which are a "Delete" ? If yes, i understand why in my graphs i have "NAN" but why poller delete it ?

This can help you ?

Thank you
User avatar
Maillon
Posts: 16
Joined: Wed Jul 04, 2007 4:34 am
Location: Paris

Post by Maillon »

Hi All ^^,

So apparently my graphs are working :D :D :D I have value. I don't know why i had "nan" value and after few minutes i had true values.... Do you know when the value "nan" become a numeric value ??

Thank you very very much Rossco and Gandalf ^^
Rossco
Cacti User
Posts: 76
Joined: Sat Jan 15, 2005 4:52 pm
Location: London, England

Post by Rossco »

Hi Maillon

Apologies for not replying sooner, work has been a nightmare today.

I'm very glad to see you've gotten it working. In answer to your nan question, I believe it usually takes two full poller cycles to go from nan to meaningful results, although it depends on whether the snmp value you are querying is a gauge or a counter.

Anyhows, well done on fixing :-)

Rossco
Rossco
Cacti User
Posts: 76
Joined: Sat Jan 15, 2005 4:52 pm
Location: London, England

Post by Rossco »

Hi Gaansch/Tarpat.

Apologies for not replying sooner.

Could both of you confirm that your snmpd daemon accounts have the correct permissions for the .pl script? I'm not an expert on file system perms, but a chmod 777 /my/path/bind9-stats-snmpd.pl may help (tighten them afterwards, if you need to).

I'm presuming they already have execute permission as you've both run them.

cheers

Rossco
gaansch
Posts: 7
Joined: Wed Jul 18, 2007 2:42 am

Post by gaansch »

Hi Rpssco,
Rossco wrote: Could both of you confirm that your snmpd daemon accounts have the correct permissions for the .pl script? I'm not an expert on file system perms, but a chmod 777 /my/path/bind9-stats-snmpd.pl may help (tighten them afterwards, if you need to).
chmod 755 should work but 777 doesn't work eather. It doesn't seem to be the problem.

The funny thing is, on another Debian Etch server with all the same software versions, but with a different script the pass command works fine.

Sebastian
Rossco
Cacti User
Posts: 76
Joined: Sat Jan 15, 2005 4:52 pm
Location: London, England

Post by Rossco »

Hi Gaansch

Yup, 755 may well work, as I said, I'm not an expert on the file perms, I just tinker ;-)

This really is bizarre. Not sure if I asked this before, but are you running snmpwalk locally or remotely? Maybe you have setup some snmp permissions in the config files?

Alternatively, how about we ignore the DNS script for the moment. If you replace the snmpd config line with something like (not tested, but sure I did something similar before):

"pass .1.3.6.1.4.1.2021.55 /usr/bin/logger SNMPD Script Called!"
or
"exec .1.3.6.1.4.1.2021.55 /usr/bin/logger SNMPD Script Called!"

Do you get any lines in your syslog? Obviously the snmpwalk will timeout, but the initial execution should have happened. You will need to restart the snmpd daemon when you do this.

If even that doesnt work, then perhaps you have multiple copies of the snmpd.conf on your system and snmpd is reading a different one?

Sorry, you can tell I'm running out of good ideas now... ;-)

Cheers

Rossco
User avatar
Maillon
Posts: 16
Joined: Wed Jul 04, 2007 4:34 am
Location: Paris

Post by Maillon »

Hi Gaansch ^^,

Have you verify owner file ? And change if necessary with the command chown ?
gaansch
Posts: 7
Joined: Wed Jul 18, 2007 2:42 am

Post by gaansch »

Hi,

the owner of the file is snmp. The snmp daemon also runs as user snmp.

Code: Select all

-rwxrwxrwx  1 snmp staff 7364 2007-07-19 09:35 bind9-stats-snmpd.pl
The Problem is, the pass command won't execute other files eather. For example: /usr/bin/touch or /usr/bin/logger.

Sebastian
Rossco
Cacti User
Posts: 76
Joined: Sat Jan 15, 2005 4:52 pm
Location: London, England

Post by Rossco »

Hi Gaansch

Is it worthwhile confirming the snmpd service is definitely reading *this* file? Maybe stick some junk in your snmpd.conf and restart the service. It should either fail to start or complain loudly, indicating whether it is definitely reading the file?

Cheers

Rossco
gaansch
Posts: 7
Joined: Wed Jul 18, 2007 2:42 am

Post by gaansch »

Hi,

okay, I've put the following line into /etc/snmp/snmpd.conf and the snmpd hasn't complained but started.

Code: Select all

asdfasdf asdf asdaf sddsf adfasdfa
Sebastian
Rossco
Cacti User
Posts: 76
Joined: Sat Jan 15, 2005 4:52 pm
Location: London, England

Post by Rossco »

Hi Gaansch

Check your snmpd.log

I get the following in mine:
/usr/local/share/snmp/snmpd.conf: line 23: Error: Blank line following sdfsdfsdfsdfsadfdsfdfds token.
net-snmp: 1 error(s) in config file(s)
NET-SNMP version 5.3.1
Cheers

Rossco
gaansch
Posts: 7
Joined: Wed Jul 18, 2007 2:42 am

Post by gaansch »

Hi Rossco,

Code: Select all

Jul 20 11:01:06 lena snmpd[19660]: /etc/snmp/snmpd.conf: line 7: Warning: Unknown token: asdfasdf.
Jul 20 11:01:06 lena snmpd[19660]: NET-SNMP version 5.2.3
it seems to be the config file, which is used ;)

okay, now we know, snmp is using the right config file, what's been clear for me, because the disk and processes I'm monitoring are working fine.

Sebastian
Rossco
Cacti User
Posts: 76
Joined: Sat Jan 15, 2005 4:52 pm
Location: London, England

Post by Rossco »

Hi Gaansch

Sorry, I'm out of ideas at this point. Maybe running smnpd in debug mode may help give you some insight?

Good luck.

Cheers

Rossco
chris.rolves
Cacti User
Posts: 52
Joined: Wed Mar 01, 2006 6:03 am

Post by chris.rolves »

I got this script to work via SNMP to my DNS servers with no issues per say. It was getting info and cacti started populating graphs but then the next Day i reallized that it was no longer working and i was getting gaps on all my graphs on cacti. I checked into it and found that it was timing out getting the info via snmp from the name servers. Any ideas as to why this would be. I do know when I have graphing enabled the name server's cpu times go from .02, 015, 031 up to 1.57, 1.68, 1.07
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests