LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   nagios-snmp (https://www.linuxquestions.org/questions/linux-newbie-8/nagios-snmp-4175425218/)

crypt90 09-02-2012 12:16 AM

nagios-snmp
 
I want to configure nagios snmp to monitor remote hosts.How can I create service and commands.cfg I need an example using check_snmp_disk to monitor remote host :banghead: Thanx..

TB0ne 09-02-2012 10:17 AM

Quote:

Originally Posted by crypt90 (Post 4770399)
I want to configure nagios snmp to monitor remote hosts.How can I create service and commands.cfg I need an example using check_snmp_disk to monitor remote host :banghead: Thanx..

Well, if you need examples, did you try looking at the Nagios site and/or the Nagios exchange, where they list MANY?
http://www.nagios.com/solutions/snmp-traps
http://exchange.nagios.org/directory...d-HOWTOs/page7
http://xavier.dusart.free.fr/nagios/en/snmptraps.html

chrism01 09-02-2012 06:14 PM

2 Attachment(s)
Well, I decided to use http://www.norgie.net/tools/check_snmp_disks/, but it seemed to me it needed a few tweaks, so the amended version is attached.

crypt90 09-03-2012 02:09 PM

define command{
command_name snmp_load
command_line /usr/local/nagios/libexec/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o .1.3.6.1.4.1.2021.10.1.5.1,.1.3.6.1.4.1.2021.10.1.5.2,.1.3.6.1.4.1.2021.10.1.5.3 -w :'$ARG2$',:'$ARG3$',:'$ARG4$' -c :'$ARG5$',:'$ARG6$',:'$ARG7$' -l load
}

Actually I want to make this code work How can I do it Looks complicated for me :) thanx for your replies

Habitual 09-03-2012 05:08 PM

Quote:

Originally Posted by crypt90 (Post 4771684)
...Looks complicated for me...

That's because it is "new" :) and that will pass.
The information you need is buried in one of these links below, but you will need to acquire the specifics yourself. Pay special attention to values in
Code:

/usr/share/snmp/snmpd.conf
specifically these:
Code:

rwuser  secretpassword 
rouser  secretpassword 
rocommunity  secretpassword xxx.xxx.171.149
rwcommunity  secretpassword xxx.xxx.171.149
com2sec paranoid  default  secretpassword

Get away from the check_whatever stuff for the time being and focus on the basics of snmp, such as
Code:

snmpwalk -v 1 -c public IP .1.3.6.1.4.1.2021.10.1.5.1
snmpwalk -v 1 -c public IP .1.3.6.1.4.1.2021.10.1.5.2
snmpwalk -v 1 -c public IP .1.3.6.1.4.1.2021.10.1.5.3

Where IP is the IPA.DDR.ESS of the server you wish to monitor. Do this on Cacti host.
The above commands are NOT part of the Cacti install. The information you seek using snmp can be gathered with or without Cacti.

I found my solution by reading up some of, or all of these...

SNMP Items with ZABBIX [Zabbix]
HowTos/Cacti on CentOS 4.x - CentOS Wiki
WARNING: Result from SNMP not valid. Partial Result: U
How-To: Monitor your servers with SNMP and Cacti | Debian/Ubuntu Tips & Tricks
Virtual Dave :: snmp/Sample snmpd.conf for cacti use
Snmpd Listen to Specific IP Address ( BIND To Selected Interfaces )
Virtual Dave :: snmp/net-snmp
How do I configure my snmpd.conf on Debian/Ubuntu for Cacti monitoring? - AYKsolutions Forum
Net-SNMP tutorial
Install and configure the Net-SNMP agent for Unix
Net-SNMP
Net-Snmp Tutorial - interfaces
Process Monitoring
Using SNMP and RRDTool on FreeBSD
SNMP Reports How-To
Monitoring with NET-SNMP
Linux SNMP OID’s for CPU,Memory and Disk Statistics
Cacti Net-SNMP *NIX Memory Usage - Template
Monitoring Windows Server 2008 R2 with SNMP and Cacti « Aaron Walrath – Another IT Guy's Meanderings
CentOS 5.6 - snmpd.conf(5)
snmpd(8)
Net-SNMP


and please don't get it twisted, just because it says "Zabbix" or "Cacti" or whatever, they are talking about communicating with a remote host using the snmp basics.

We don't use Cacti any further, (unless someone pays for it) in favor of Zabbix for our c9 internal monitoring.

Good Luck.

Sign up here...http://forums.cacti.net/

crypt90 09-04-2012 12:25 PM

Thanx for the replay dude actually very helpful to me this is very confusing have to learn now :)
Good replay thanx again...

Habitual 09-04-2012 05:05 PM

Thank me after you get some info back from snmpwalk :)


All times are GMT -5. The time now is 10:36 PM.