Re: [Nagios-users] Final stage of getting MRTG working with Nagios v2
I may be wrong here but i thought you had to point the check_mrtg to a rrd file and not the rrdtool log file. Greg Pangrazio pangr...@gmail.com On Sun, Nov 15, 2009 at 8:24 PM, AJay a...@wxsec.com wrote: Your mrtg is probably not working correctly, check you mrtg.cfg and /var/spool/mail/root to see what's going on with mrtg. -- AJay -- Original -- *From: * xmanhostinganth...@xmanhosting.com.au; *Date: * Sat, Nov 14, 2009 12:27 PM *To: * nagios-usersnagios-users@lists.sourceforge.net; *Subject: * [Nagios-users] Final stage of getting MRTG working with Nagios v2 Hello, I have been fluffing around with Nagios for a couple of weeks, and have nearly finally nailed it. I just have one thing to go. I am trying to get MRTG to work with Nagios. I have got MRGT working locally on my machine , and can see it working bygoing to these 2 sites (locally) in a browser: file:///usr/local/mrtg-2/share/mrtg2/icons/index.htmlhttp://m33.mail.qq.com/cgi-bin/frame_html?sid=6AuAxsNrmrW1bmsgr=31ef6d4e0997510a3066d059ab83e370# and file:///usr/local/mrtg-2/share/mrtg2/icons/localhost_2.htmlhttp://m33.mail.qq.com/cgi-bin/frame_html?sid=6AuAxsNrmrW1bmsgr=31ef6d4e0997510a3066d059ab83e370# I followed the tutorial below to set up my router with Nagios: http://www.thegeekstuff.com/2008/11/how-to-monitor-network-switch-and-ports-using-nagios/ however I am yet to get MRTG working with Nagios: PING OK 11-14-2009 13:13:56 21d 16h 10m 13s 1/3 PING OK - Packet loss = 0%, RTA = 1.38 ms Port 1 Bandwidth Usage UNKNOWN 11-14-2009 13:09:49 21d 16h 8m 43s 3/3 *check_mrtgtraf: Unable to open MRTG log file* Port 1 Link Status OK 11-14-2009 13:11:29 12d 22h 37m 5s 1/3 SNMP OK - up(1) Uptime OK 11-14-2009 13:10:29 12d 22h 27m 57s 1/3 SNMP OK - Timeticks: (152738042) 17 days, 16:16:20.42 My switch.cfg currently has the following: # Monitor bandwidth via MRTG logs define service{ use generic-service ; Inherit values from a template host_nameBillion service_description Port 1 Bandwidth Usage check_command* check_local_mrtgtraf!/usr/local/mrtg-2/share/mrtg2/icons/localhost2.log!AVG!100,100!500,500!10 * } My localhost2.log is at the location above: * /usr/local/mrtg-2/share/mrtg2/icons/localhost2.log* ,however I still must have something wrong for it to not work. When I run: /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg , it says: *Things look okay - No serious problems were detected during the pre-flight check* When I run: /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg , it says: --- ERROR: Mrtg will most likely not work properly when the environment variable LANG is set to UTF-8. Please run mrtg in an environment where this is not the case. Try the following command to start: env LANG=C /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg --- When I run: env LANG=C /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg , there are no errors. Does anyone know what I am still doing wrong Thanks for any help, Kind regards, Anthony -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Final stage of getting MRTG working with Nagios v2
My mrtg.cfg: HtmlDir: /var/www/mrtg ImageDir: /var/www/mrtg LogDir: /var/lib/mrtg ThreshDir: /var/lib/mrtg Options[_]: growright, bits #WorkDir: /var/lib/mrtg Target[switch]: 10101:pub...@192.168.1.1 MaxBytes[switch]: 1250 Title[switch]: 3750G Gi1/0/1 Traffic Analysis PageTop[switch]: H1Stats for Gi1/0/1 of 3750G/H1 # [switch] means log file name is switch.log, and it will be created in LogDir. 10101 is the interface-number that I want to monitor. Use snmpwalk -v2c -c community-string HOST 1.3.6.1.2.1.31.1.1.1.1 you'll get lines like this: IF-MIB::ifName.x = STRING: Gi1/0/1 and x is the interface-number. and my switch.cfg: ### define service{ use generic-service host_name 3750G service_description Gi 1/0/1 Traffic check_command check_local_mrtgtraf!/var/lib/mrtg/switch.log!AVG!50,100!150,200!10 } ### The first ARG /var/lib/mrtg/switch.log shows where the mrtg log file is. Make sure it's consistent with the settings in your mrtg.cfg. -- AJay -- Original -- From: xmanhostinganth...@xmanhosting.com.au; Date: Mon, Nov 16, 2009 08:00 PM To: 'AJay'a...@wxsec.com; Subject: RE: [Nagios-users] Final stage of getting MRTG working with Nagios v2 Hello Ajay, Thanks for the reply - however I have no idea what I am looking for in these files as I am new to all of this. Would you be able to point me in the right direction? Kind regards, Anthony. From: xjtu...@qq.com [mailto:xjtu...@qq.com] On Behalf Of AJay Sent: Monday, 16 November 2009 11:24 AM To: xmanhosting; nagios-users Subject: Re:[Nagios-users] Final stage of getting MRTG working with Nagios v2 Your mrtg is probably not working correctly, check you mrtg.cfg and /var/spool/mail/root to see what's going on with mrtg. -- AJay -- Original -- From: xmanhostinganth...@xmanhosting.com.au; Date: Sat, Nov 14, 2009 12:27 PM To: nagios-usersnagios-users@lists.sourceforge.net; Subject: [Nagios-users] Final stage of getting MRTG working with Nagios v2 Hello, I have been fluffing around with Nagios for a couple of weeks, and have nearly finally nailed it. I just have one thing to go. I am trying to get MRTG to work with Nagios. I have got MRGT working locally on my machine , and can see it working by going to these 2 sites (locally) in a browser: file:///usr/local/mrtg-2/share/mrtg2/icons/index.html and file:///usr/local/mrtg-2/share/mrtg2/icons/localhost_2.html I followed the tutorial below to set up my router with Nagios: http://www.thegeekstuff.com/2008/11/how-to-monitor-network-switch-and-ports-using-nagios/ however I am yet to get MRTG working with Nagios: PING OK 11-14-2009 13:13:56 21d 16h 10m 13s 1/3 PING OK - Packet loss = 0%, RTA = 1.38 ms Port 1 Bandwidth Usage UNKNOWN 11-14-2009 13:09:49 21d 16h 8m 43s 3/3 check_mrtgtraf: Unable to open MRTG log file Port 1 Link Status OK 11-14-2009 13:11:29 12d 22h 37m 5s 1/3 SNMP OK - up(1) Uptime OK 11-14-2009 13:10:29 12d 22h 27m 57s 1/3 SNMP OK - Timeticks: (152738042) 17 days, 16:16:20.42 My switch.cfg currently has the following: # Monitor bandwidth via MRTG logs define service{ use generic-service ; Inherit values from a template host_nameBillion service_description Port 1 Bandwidth Usage check_command check_local_mrtgtraf!/usr/local/mrtg-2/share/mrtg2/icons/localhost2.log!AVG!100,100!500,500!10 } My localhost2.log is at the location above: /usr/local/mrtg-2/share/mrtg2/icons/localhost2.log ,however I still must have something wrong for it to not work. When I run: /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg , it says: Things look okay - No serious problems were detected during the pre-flight check When I run: /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg , it says: --- ERROR: Mrtg will most likely not work properly when the environment variable LANG is set to UTF-8. Please run mrtg in an environment where this is not the case. Try the following command to start: env LANG=C /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg --- When I run: env LANG=C /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg , there are no errors. Does anyone know what I am still doing wrong Thanks for any help, Kind regards, Anthony-- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment
Re: [Nagios-users] Final stage of getting MRTG working with Nagios v2
Your mrtg is probably not working correctly, check you mrtg.cfg and /var/spool/mail/root to see what's going on with mrtg. -- AJay -- Original -- From: xmanhostinganth...@xmanhosting.com.au; Date: Sat, Nov 14, 2009 12:27 PM To: nagios-usersnagios-users@lists.sourceforge.net; Subject: [Nagios-users] Final stage of getting MRTG working with Nagios v2 Hello, I have been fluffing around with Nagios for a couple of weeks, and have nearly finally nailed it. I just have one thing to go. I am trying to get MRTG to work with Nagios. I have got MRGT working locally on my machine , and can see it working by going to these 2 sites (locally) in a browser: file:///usr/local/mrtg-2/share/mrtg2/icons/index.html and file:///usr/local/mrtg-2/share/mrtg2/icons/localhost_2.html I followed the tutorial below to set up my router with Nagios: http://www.thegeekstuff.com/2008/11/how-to-monitor-network-switch-and-ports-using-nagios/ however I am yet to get MRTG working with Nagios: PING OK 11-14-2009 13:13:56 21d 16h 10m 13s 1/3 PING OK - Packet loss = 0%, RTA = 1.38 ms Port 1 Bandwidth Usage UNKNOWN 11-14-2009 13:09:49 21d 16h 8m 43s 3/3 check_mrtgtraf: Unable to open MRTG log file Port 1 Link Status OK 11-14-2009 13:11:29 12d 22h 37m 5s 1/3 SNMP OK - up(1) Uptime OK 11-14-2009 13:10:29 12d 22h 27m 57s 1/3 SNMP OK - Timeticks: (152738042) 17 days, 16:16:20.42 My switch.cfg currently has the following: # Monitor bandwidth via MRTG logs define service{ use generic-service ; Inherit values from a template host_nameBillion service_description Port 1 Bandwidth Usage check_command check_local_mrtgtraf!/usr/local/mrtg-2/share/mrtg2/icons/localhost2.log!AVG!100,100!500,500!10 } My localhost2.log is at the location above: /usr/local/mrtg-2/share/mrtg2/icons/localhost2.log ,however I still must have something wrong for it to not work. When I run: /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg , it says: Things look okay - No serious problems were detected during the pre-flight check When I run: /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg , it says: --- ERROR: Mrtg will most likely not work properly when the environment variable LANG is set to UTF-8. Please run mrtg in an environment where this is not the case. Try the following command to start: env LANG=C /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg --- When I run: env LANG=C /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg , there are no errors. Does anyone know what I am still doing wrong Thanks for any help, Kind regards, Anthony-- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] Final stage of getting MRTG working with Nagios v2
Hello, I have been fluffing around with Nagios for a couple of weeks, and have nearly finally nailed it. I just have one thing to go. I am trying to get MRTG to work with Nagios. I have got MRGT working locally on my machine , and can see it working by going to these 2 sites (locally) in a browser: file:///usr/local/mrtg-2/share/mrtg2/icons/index.html and file:///usr/local/mrtg-2/share/mrtg2/icons/localhost_2.html I followed the tutorial below to set up my router with Nagios: http://www.thegeekstuff.com/2008/11/how-to-monitor-network-switch-and-ports- using-nagios/ however I am yet to get MRTG working with Nagios: PING OK 11-14-2009 13:13:56 21d 16h 10m 13s 1/3 PING OK - Packet loss = 0%, RTA = 1.38 ms Port 1 Bandwidth Usage UNKNOWN 11-14-2009 13:09:49 21d 16h 8m 43s 3/3 check_mrtgtraf: Unable to open MRTG log file Port 1 Link Status OK 11-14-2009 13:11:29 12d 22h 37m 5s 1/3 SNMP OK - up(1) Uptime OK 11-14-2009 13:10:29 12d 22h 27m 57s 1/3 SNMP OK - Timeticks: (152738042) 17 days, 16:16:20.42 My switch.cfg currently has the following: # Monitor bandwidth via MRTG logs define service{ use generic-service ; Inherit values from a template host_nameBillion service_description Port 1 Bandwidth Usage check_command check_local_mrtgtraf!/usr/local/mrtg-2/share/mrtg2/icons/localhost2.log!AVG! 100,100!500,500!10 } My localhost2.log is at the location above: /usr/local/mrtg-2/share/mrtg2/icons/localhost2.log ,however I still must have something wrong for it to not work. When I run: /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg , it says: Things look okay - No serious problems were detected during the pre-flight check When I run: /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg , it says: --- ERROR: Mrtg will most likely not work properly when the environment variable LANG is set to UTF-8. Please run mrtg in an environment where this is not the case. Try the following command to start: env LANG=C /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg --- When I run: env LANG=C /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg , there are no errors. Does anyone know what I am still doing wrong Thanks for any help, Kind regards, Anthony -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null