LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-21-2011, 12:43 PM   #1
linuxguruu
LQ Newbie
 
Registered: Oct 2011
Posts: 6

Rep: Reputation: Disabled
Nagios + Snmp + Mrtg


Hi all,

i have configured nagios in fedora. its up n running. i have added some core switches, wan links in nagios. what i want from nagios

1 - Nagios should show me my wan links bandwidth utilization in graph

2 - Nagios should show snmp details

i know for this i have to install snmp and mrtg in nagios but somehow i am not getting success to do so. kindly guide me how to configure snmp and mrtg in nagios

Thanks
 
Old 10-23-2011, 05:13 AM   #2
vasile002
Member
 
Registered: Oct 2011
Posts: 51

Rep: Reputation: Disabled
Here's a nice howto:
http://bigunix.blogspot.com/2009/07/...-mrtg-and.html

I hope it helps
 
Old 10-24-2011, 07:42 AM   #3
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
You could also look at "FAN" which provides Centreon for nagios config and graphing.
 
Old 10-24-2011, 09:44 AM   #4
linuxguruu
LQ Newbie
 
Registered: Oct 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hi,

i am following this link

http://bigunix.blogspot.com/2009/07/...-mrtg-and.html

this is the error i am getting when i am doing make

[root@localhost check_snmp-1.1]# make
depbase=`echo src/check_snmp.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
if gcc -DHAVE_CONFIG_H -I. -I. -I./inc -g -O2 -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_RPM_4_4_COMPAT -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl5/CORE -I/usr/include -MT src/check_snmp.o -MD -MP -MF "$depbase.Tpo" -c -o src/check_snmp.o src/check_snmp.c; \
then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
In file included from src/check_snmp.c:24:0:
./inc/check_snmp.h:104:32: warning: ‘struct variable_list’ declared inside parameter list [enabled by default]
./inc/check_snmp.h:104:32: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
./inc/check_snmp.h:105:62: warning: ‘struct variable_list’ declared inside parameter list [enabled by default]
./inc/check_snmp.h:106:60: warning: ‘struct variable_list’ declared inside parameter list [enabled by default]
./inc/check_snmp.h:107:60: warning: ‘struct variable_list’ declared inside parameter list [enabled by default]
./inc/check_snmp.h:108:59: warning: ‘struct variable_list’ declared inside parameter list [enabled by default]
src/check_snmp.c:28:68: warning: ‘struct snmp_pdu’ declared inside parameter list [enabled by default]
src/check_snmp.c: In function ‘check_snmp’:
src/check_snmp.c:61:25: error: storage size of ‘init’ isn’t known
src/check_snmp.c:63:5: error: unknown type name ‘oid’
src/check_snmp.c:63:19: error: ‘MAX_OID_LEN’ undeclared (first use in this function)
src/check_snmp.c:63:19: note: each undeclared identifier is reported only once for each function it appears in
src/check_snmp.c:66:5: warning: implicit declaration of function ‘snmp_disable_log’ [-Wimplicit-function-declaration]
src/check_snmp.c:68:9: warning: implicit declaration of function ‘snmp_enable_stderrlog’ [-Wimplicit-function-declaration]
src/check_snmp.c:69:5: warning: implicit declaration of function ‘init_snmp’ [-Wimplicit-function-declaration]
src/check_snmp.c:70:5: warning: implicit declaration of function ‘snmp_sess_init’ [-Wimplicit-function-declaration]
src/check_snmp.c:73:20: error: ‘SNMP_VERSION_2c’ undeclared (first use in this function)
src/check_snmp.c:81:5: warning: implicit declaration of function ‘snmp_open’ [-Wimplicit-function-declaration]
src/check_snmp.c:84:17: warning: implicit declaration of function ‘snmp_api_errstring’ [-Wimplicit-function-declaration]
src/check_snmp.c:89:5: warning: implicit declaration of function ‘snmp_pdu_create’ [-Wimplicit-function-declaration]
src/check_snmp.c:89:27: error: ‘SNMP_MSG_GET’ undeclared (first use in this function)
src/check_snmp.c:92:9: warning: implicit declaration of function ‘snmp_parse_oid’ [-Wimplicit-function-declaration]
src/check_snmp.c:95:60: error: ‘snmp_errno’ undeclared (first use in this function)
src/check_snmp.c:99:9: warning: implicit declaration of function ‘snmp_add_null_var’ [-Wimplicit-function-declaration]
src/check_snmp.c:102:5: warning: implicit declaration of function ‘snmp_synch_response’ [-Wimplicit-function-declaration]
src/check_snmp.c:104:14: error: ‘STAT_SUCCESS’ undeclared (first use in this function)
src/check_snmp.c:105:29: error: dereferencing pointer to incomplete type
src/check_snmp.c:106:22: error: ‘SNMP_ERR_NOERROR’ undeclared (first use in this function)
src/check_snmp.c:107:21: warning: passing argument 2 of ‘check_snmp_response’ from incompatible pointer type [enabled by default]
src/check_snmp.c:28:12: note: expected ‘struct snmp_pdu *’ but argument is of type ‘struct snmp_pdu *’
src/check_snmp.c:112:56: error: dereferencing pointer to incomplete type
src/check_snmp.c:117:14: error: ‘STAT_ERROR’ undeclared (first use in this function)
src/check_snmp.c:122:14: error: ‘STAT_TIMEOUT’ undeclared (first use in this function)
src/check_snmp.c:134:9: warning: implicit declaration of function ‘snmp_free_pdu’ [-Wimplicit-function-declaration]
src/check_snmp.c:135:5: warning: implicit declaration of function ‘snmp_close’ [-Wimplicit-function-declaration]
src/check_snmp.c:63:13: warning: unused variable ‘objid’ [-Wunused-variable]
src/check_snmp.c:61:25: warning: unused variable ‘init’ [-Wunused-variable]
src/check_snmp.c: At top level:
src/check_snmp.c:164:61: warning: ‘struct snmp_pdu’ declared inside parameter list [enabled by default]
src/check_snmp.c:164:1: error: conflicting types for ‘check_snmp_response’
src/check_snmp.c:28:12: note: previous declaration of ‘check_snmp_response’ was here
src/check_snmp.c: In function ‘check_snmp_response’:
src/check_snmp.c:167:42: error: dereferencing pointer to incomplete type
src/check_snmp.c:170:13: warning: passing argument 2 of ‘check_snmp_intervals’ from incompatible pointer type [enabled by default]
./inc/check_snmp.h:105:5: note: expected ‘struct variable_list *’ but argument is of type ‘struct variable_list *’
src/check_snmp.c:173:13: warning: passing argument 2 of ‘check_snmp_strings’ from incompatible pointer type [enabled by default]
./inc/check_snmp.h:106:5: note: expected ‘struct variable_list *’ but argument is of type ‘struct variable_list *’
src/check_snmp.c:176:13: warning: passing argument 2 of ‘check_snmp_regexes’ from incompatible pointer type [enabled by default]
./inc/check_snmp.h:107:5: note: expected ‘struct variable_list *’ but argument is of type ‘struct variable_list *’
src/check_snmp.c:179:13: warning: passing argument 2 of ‘check_snmp_simple’ from incompatible pointer type [enabled by default]
./inc/check_snmp.h:108:5: note: expected ‘struct variable_list *’ but argument is of type ‘struct variable_list *’
src/check_snmp.c: At top level:
src/check_snmp.c:186:28: warning: ‘struct variable_list’ declared inside parameter list [enabled by default]
src/check_snmp.c:186:1: error: conflicting types for ‘check_snmp_var_type’
./inc/check_snmp.h:104:5: note: previous declaration of ‘check_snmp_var_type’ was here
src/check_snmp.c: In function ‘check_snmp_var_type’:
src/check_snmp.c:188:14: error: dereferencing pointer to incomplete type
src/check_snmp.c:189:14: error: ‘SNMP_NOSUCHOBJECT’ undeclared (first use in this function)
src/check_snmp.c:190:14: error: ‘SNMP_NOSUCHINSTANCE’ undeclared (first use in this function)
src/check_snmp.c: In function ‘check_snmp_get_value’:
src/check_snmp.c:203:16: error: ‘ASN_APPLICATION’ undeclared (first use in this function)
src/check_snmp.c: At top level:
src/check_snmp.c:28:12: warning: ‘check_snmp_response’ used but never defined [enabled by default]
src/check_snmp.c:164:1: warning: ‘check_snmp_response’ defined but not used [-Wunused-function]
src/check_snmp.c: In function ‘check_snmp_var_type’:
src/check_snmp.c:195:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [src/check_snmp.o] Error 1
[root@localhost check_snmp-1.1]#
 
Old 10-24-2011, 10:06 AM   #5
linuxguruu
LQ Newbie
 
Registered: Oct 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
[root@localhost ~]# rpm -qa | grep snmp
net-snmp-libs-5.6.1-7.fc15.i686
net-snmp-devel-5.6.1-7.fc15.i686
snmp++-devel-3.2.25-1.fc15.i686
net-snmp-5.6.1-7.fc15.i686
snmp++-3.2.25-1.fc15.i686
net-snmp-utils-5.6.1-7.fc15.i686
 
Old 10-25-2011, 01:07 PM   #6
vasile002
Member
 
Registered: Oct 2011
Posts: 51

Rep: Reputation: Disabled
did you check the requirements list from the check_snmp docs? do you meet those? What OS are you running?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
snmp and mrtg explanation maxreefer Linux - Networking 4 01-25-2008 10:34 AM
snmp-mrtg ahmed4linux Linux - General 1 11-03-2004 07:27 AM
help with mrtg and snmp cristi1979 Linux - Networking 1 06-24-2003 08:49 PM
Snmp/mrtg hydro Linux - Software 1 06-15-2003 09:39 AM
Running SNMP in RH 7.2 (for MRTG) Token Linux - Software 0 06-12-2002 02:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration