Errors when running LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Errors when running LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/

Post by vijilants »

System: 2012R2.9

OS: Centos6.4

I wonder if anyone could help me with the following problem:

I am getting the following errors when running LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/

Code: Select all

 LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg –check
2014-05-12 09:35:35: ERROR: Target[10.40.1.251_32][_IN_] ' $target->[9]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.251_32][_OUT_] ' $target->[9]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.251_33][_IN_] ' $target->[10]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.251_33][_OUT_] ' $target->[10]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.249_22][_IN_] ' $target->[49]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.249_22][_OUT_] ' $target->[49]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.249_23][_IN_] ' $target->[50]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.249_23][_OUT_] ' $target->[50]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.249_24][_IN_] ' $target->[51]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.249_24][_OUT_] ' $target->[51]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.254_37][_IN_] ' $target->[111]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.254_37][_OUT_] ' $target->[111]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.254_38][_IN_] ' $target->[112]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.254_38][_OUT_] ' $target->[112]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.254_54][_IN_] ' $target->[113]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.254_54][_OUT_] ' $target->[113]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.254_55][_IN_] ' $target->[114]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.254_55][_OUT_] ' $target->[114]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.254_57][_IN_] ' $target->[115]{$mode} ' did not eval into defined data
2014-05-12 09:35:35: ERROR: Target[10.40.1.254_57][_OUT_] ' $target->[115]{$mode} ' did not eval into defined data
[# 
How do I go about fixing this problem ?

Many Thank
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Errors when running LANG=C LC_ALL=C /usr/bin/mrtg /etc/m

Post by scottwilkerson »

Do these ports actually exist on 10.40.1.251?
32,33,22,23,24,37,38,54,55,57
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: Errors when running LANG=C LC_ALL=C /usr/bin/mrtg /etc/m

Post by vijilants »

The unit in question is a Cisco Router,

I'm really not sure as to how Nagios interprets the port numbers as these don't exist on the router as physical ports.

So in reply to your question.....I'm not exactly sure as to what these port numbers are referring to.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Errors when running LANG=C LC_ALL=C /usr/bin/mrtg /etc/m

Post by slansing »

How large is the switch? If it is in the 24-48 port range it looks like they should exist. You can remove those entries entirely from the MRTG config, but if they also exist as services in Nagios XI you will want to remove them there too if they are not valid and are not currently returning valid information. You can follow this document here:

http://assets.nagios.com/downloads/nagi ... Router.pdf
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: Errors when running LANG=C LC_ALL=C /usr/bin/mrtg /etc/m

Post by vijilants »

Its not a switch.....its a router with no more than six interfaces on it.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Errors when running LANG=C LC_ALL=C /usr/bin/mrtg /etc/m

Post by tmcdonald »

Did you try manually removing the MRTG entries in the config and from the XI interface? The errors are because MRTG thinks the router has more interfaces than it does, so checking them is failing. Removing them by hand should help reduce the errors and cut the monitoring down to just what actually exists.
Former Nagios employee
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: Errors when running LANG=C LC_ALL=C /usr/bin/mrtg /etc/m

Post by vijilants »

Hi ,

I have had to revisit this problem as I wish to upgrade to the latest version of Nagios and I want to make sure the system is clean prior to upgrade. I have not deleted anything as yet as I was unsure as to what I should be deleting in the GUI due to weird port numbers

I ran the command again today and it appears that the output has changed and I'm really not sure as to why it looks like this (see below) The unit that has IP address 192.168.40.6 is a live system but has been down for the past couple of weeks. Not sure as to what to do about the errors in this file as it appears to be a moving target

Code: Select all

 LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg –check
SNMP Error:
no response received
SNMPv2c_Session (remote host: "192.168.40.6" [192.168.40.6].161)
                   community: "##########"
                  request ID: 358268417
                 PDU bufsize: 8000 bytes
                     timeout: 2s
                     retries: 5
                     backoff: 1)
 at /usr/bin/../lib/mrtg2/SNMP_util.pm line 492
SNMPGET Problem for ifInOctets.1 ifOutOctets.1 on #######@192.168.40.6:::::2:v4only
 at /usr/bin/mrtg line 2203
2014-06-03 09:59:01: WARNING: skipping because at least the query for ifInOctets.1 on  192.168.40.6 did not succeed
2014-06-03 09:59:01: WARNING: no data for ifInOctets&ifOutOctets:[email protected]. Skipping further queries for Host 192.168.40.6 in this round.
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_1][_IN_] ' $target->[224]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_1][_OUT_] ' $target->[224]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_3][_IN_] ' $target->[225]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_3][_OUT_] ' $target->[225]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_9][_IN_] ' $target->[226]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_9][_OUT_] ' $target->[226]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_10][_IN_] ' $target->[227]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_10][_OUT_] ' $target->[227]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_11][_IN_] ' $target->[228]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_11][_OUT_] ' $target->[228]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_12][_IN_] ' $target->[229]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_12][_OUT_] ' $target->[229]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_13][_IN_] ' $target->[230]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_13][_OUT_] ' $target->[230]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_14][_IN_] ' $target->[231]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_14][_OUT_] ' $target->[231]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_15][_IN_] ' $target->[232]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_15][_OUT_] ' $target->[232]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_16][_IN_] ' $target->[233]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_16][_OUT_] ' $target->[233]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_17][_IN_] ' $target->[234]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_17][_OUT_] ' $target->[234]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_18][_IN_] ' $target->[235]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_18][_OUT_] ' $target->[235]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_19][_IN_] ' $target->[236]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_19][_OUT_] ' $target->[236]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_20][_IN_] ' $target->[237]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_20][_OUT_] ' $target->[237]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_21][_IN_] ' $target->[238]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_21][_OUT_] ' $target->[238]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_27][_IN_] ' $target->[239]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_27][_OUT_] ' $target->[239]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_29][_IN_] ' $target->[240]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_29][_OUT_] ' $target->[240]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_30][_IN_] ' $target->[241]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_30][_OUT_] ' $target->[241]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_31][_IN_] ' $target->[242]{$mode} ' did not eval into defined data
2014-06-03 09:59:28: ERROR: Target[192.168.40.6_31][_OUT_] ' $target->[242]{$mode} ' did not eval into defined data
# 
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Errors when running LANG=C LC_ALL=C /usr/bin/mrtg /etc/m

Post by sreinhardt »

Often those additional ports are vlans and other virtual interfaces. Could you provide the config for this particular device as shown in CCM or from the flat files please? We can then compare the mrtg output and the config to help advise which ports to remove from one or both places.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: Errors when running LANG=C LC_ALL=C /usr/bin/mrtg /etc/m

Post by vijilants »

Do you want the host settings or the service settings for that device as there are many services ?

How shall I provide them here using CCM ?....via a screendump ?

Would it not be easier using the flatfiles and if so, can you please guide me as to where I can locate those files ?

Many Thanks
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Errors when running LANG=C LC_ALL=C /usr/bin/mrtg /etc/m

Post by sreinhardt »

Actually I would like the flat file, of just that hosts services. You should be able to go into CCM->services Filter for your host, and use the disk icon to download the flat file containing all services under that config name.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked