Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Dec 14, 2017 12:13 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: BIND Template
PostPosted: Mon Oct 23, 2017 6:17 am 
Offline

Joined: Mon Oct 09, 2017 5:26 am
Posts: 11
Hi

Experiencing some issues with the BIND template. I think it is possibly around the snmpd.conf file

Error which I am receiving when attempting an snmpwalk

Code:
[[email protected] scripts]# snmpwalk -v2c -c <community> <IP-Address> 1.3.6.1.4.1.18689.0.1
SNMPv2-SMI::enterprises.18689.0.1 = No more variables left in this MIB View (It is past the end of the MIB tree)


This is added to the bottom of my snmpd.conf file
Code:
###############################################################################
# Further Information
#
#  See the snmpd.conf manual page, and the output of "snmpd -H".

###############################################################################
# Additional Scripts added to snmpd.conf
#
# See documentation for further information
extend .1.3.6.1.4.1.18689.0.1 dnscache-stats /root/bin/runstats.sh


snmpd has been restarted and there is no errors when the daemon is started up


Top
 Profile  
 
 Post subject: Re: BIND Template
PostPosted: Mon Oct 23, 2017 6:37 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2642
Location: Kressbronn, Germany
extend works a bit different then how exec did.

In snmpd you will have to add this:

Code:
extend dnscache-stats /root/bin/runstats.sh


then you can query it using this format:
Code:
snmpwalk -c <community> -v 2c <IP-Address> 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."dnscache-stats"'

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code:
CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061


Top
 Profile  
 
 Post subject: Re: BIND Template
PostPosted: Mon Oct 23, 2017 7:10 am 
Offline

Joined: Mon Oct 09, 2017 5:26 am
Posts: 11
Thanks, but that doesn't appear to work either - after editing snmpd.conf and restart

Code:
[[email protected] scripts]# snmpwalk -c <community> -v 2c <IP-Address> 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."dnscache-stats"'
NET-SNMP-EXTEND-MIB::nsExtendOutLine."dnscache-stats" = No more variables left in this MIB View (It is past the end of the MIB tree)


snmpd.conf

Code:
###############################################################################
# Further Information
#
#  See the snmpd.conf manual page, and the output of "snmpd -H".

###############################################################################
# Additional Scripts added to snmpd.conf
#
# See documentation for further information
extend dnscache-stats /root/bin/runstats.sh


Top
 Profile  
 
 Post subject: Re: BIND Template
PostPosted: Mon Oct 23, 2017 7:13 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2642
Location: Kressbronn, Germany
Are you sure the script is executeable/readable by snmpd ?

you can add a /bin/bash in front of it:
Code:
extend dnscache-stats /bin/bash /root/bin/runstats.sh


or add a #!/bin/bash to the top of that script.

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code:
CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061


Top
 Profile  
 
 Post subject: Re: BIND Template
PostPosted: Mon Oct 23, 2017 7:18 am 
Offline

Joined: Mon Oct 09, 2017 5:26 am
Posts: 11
There is no snmpd user? Using CentOS7 - if that helps

Code:
# ls -lah
total 12K
drwxr-xr-x  2 root root   44 Oct 23 11:26 .
dr-xr-x---. 3 root root  146 Oct 23 09:37 ..
-rwxr-xr-x  1 root root 5.6K Oct 23 09:39 dnsstats.pl
-rwxr-xr-x  1 root root  113 Oct 23 09:38 runstats.sh


Top
 Profile  
 
 Post subject: Re: BIND Template
PostPosted: Mon Oct 23, 2017 8:31 am 
Offline

Joined: Mon Oct 09, 2017 5:26 am
Posts: 11
been able to make a little progress on this. Can execute this locally from the DNS server, but not remotely.

locally
Code:
[[email protected] bin]# snmpwalk -v 2c -c <community> localhost 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."dnscache-stats"'
NET-SNMP-EXTEND-MIB::nsExtendOutLine."dnscache-stats".1 = STRING: a:0 a6:0 aaaa:0 any:0 cname:0 mx:0 naptr:0 ns:0 ptr:0 soa:0 spf:0 srv:0 txt:0 rsnx: rsfail: rserr: rsipv4qs: rsipv4rr: rsmismatch: rsqr: rsqt: rsrtt10: rsrtt100500: rsrtt10100: rsrtt1600: rsrtt500800: rsrtt8001600: sockopen:7 sockclosed:5 sockbf: consest: recverr:
[[email protected] bin]#


remotely
Code:
[[email protected] scripts]# snmpwalk -c <community>-v 2c <IP-Address> 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."dnscache-stats"'
NET-SNMP-EXTEND-MIB::nsExtendOutLine."dnscache-stats" = No more variables left in this MIB View (It is past the end of the MIB tree)
[[email protected] scripts]#


I am assuming that this is a snmpd.conf issue, but unsure where.....


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group