check_iftraffic64 (No output on stdout) stderr:

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
HeadEgg
Posts: 3
Joined: Sat Jan 07, 2017 10:27 am

check_iftraffic64 (No output on stdout) stderr:

Post by HeadEgg »

I want to use check_iftraffic64 with pnp4nagios on Nagios core.

But after I tried to apply service check_iftrafic, at 'Status Information' on Service page, it show "(No output on stdout) stderr:"
Image

It's weird, because I can get the output from original check_iftraffic64.pl

Code: Select all

[root@osboxes etc]# /usr/local/nagios/libexec/check_iftraffic64.pl -H 192.168.99.253 -C <XXXXXX> -i GigabitEthernet1/0/1 -r -b 1000 -u m -B -f
OK - Average IN: 132.08b (0.00%), Average OUT: 515.28b (0.00%)Total RX: 464.00Mbits, Total TX: 4.54Gbits|inUsage=0.00%;85;98 outUsage=0.00%;85;98 inBandwidth=16.51B outBandwidth=64.41B inAbsolut=57999689c outAbsolut=567085849c
I was done
chown -R nagios:nagios check_iftraffic64.pl
chmod 750 check_iftraffic64.pl

Code: Select all

[root@osboxes etc]# ls -l /usr/local/nagios/libexec/check_iftraffic64.pl 
-rwxr-x---. 1 nagios nagios 39106 Jan  6 02:53 /usr/local/nagios/libexec/check_iftraffic64.pl
This is verify

Code: Select all

[root@osboxes etc]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.2.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 12-07-2016
License: GPL

Website: https://www.nagios.org
Reading configuration data...
   Read main config file okay...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
	Checked 15 services.
	Checked 3 hosts.
	Checked 2 host groups.
	Checked 0 service groups.
	Checked 1 contacts.
	Checked 1 contact groups.
	Checked 27 commands.
	Checked 5 time periods.
	Checked 0 host escalations.
	Checked 0 service escalations.
Checking for circular paths...
	Checked 3 hosts
	Checked 0 service dependencies
	Checked 0 host dependencies
	Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
[root@osboxes etc]# perl ~/verify_pnp_config --mode bulk+npcd --config=/usr/local/nagios/etc/nagios.cfg --pnpcfg=/usr/local/pnp4nagios/etc
[INFO]  ========== Starting Environment Checks ============
[INFO]  My version is: verify_pnp_config-0.6.25-R.40
[INFO]  Start Options: /root/verify_pnp_config --mode bulk+npcd --config=/usr/local/nagios/etc/nagios.cfg --pnpcfg=/usr/local/pnp4nagios/etc
[INFO]  Reading /usr/local/nagios/etc/nagios.cfg
[OK  ]  Running product is 'nagios'
[OK  ]  object_cache_file is defined
[OK  ]  object_cache_file=/usr/local/nagios/var/objects.cache
[INFO]  Reading /usr/local/nagios/var/objects.cache
[OK  ]  resource_file is defined
[OK  ]  resource_file=/usr/local/nagios/etc/resource.cfg
[INFO]  Reading /usr/local/nagios/etc/resource.cfg
[INFO]  Reading /usr/local/pnp4nagios/etc/process_perfdata.cfg
[INFO]  Reading /usr/local/pnp4nagios/etc/pnp4nagios_release
[OK  ]  Found PNP4Nagios version "0.6.25"
[OK  ]  Effective User is 'nagios'
[OK  ]  User nagios exists with ID '1001'
[OK  ]  Effective group is 'nagios'
[OK  ]  Group nagios exists with ID '1001'
[INFO]  ========== Checking Bulk Mode + NPCD Config  ============
[OK  ]  process_performance_data is 1 compared with '/1/'
[OK  ]  service_perfdata_file is defined
[OK  ]  service_perfdata_file=/usr/local/pnp4nagios/var/service-perfdata
[OK  ]  service_perfdata_file_template is defined
[OK  ]  service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECH$
[OK  ]  PERFDATA template looks good
[OK  ]  service_perfdata_file_mode is defined
[OK  ]  service_perfdata_file_mode=a
[OK  ]  service_perfdata_file_processing_interval is defined
[OK  ]  service_perfdata_file_processing_interval=15
[OK  ]  service_perfdata_file_processing_command is defined
[OK  ]  service_perfdata_file_processing_command=process-service-perfdata-file
[OK  ]  host_perfdata_file is defined
[OK  ]  host_perfdata_file=/usr/local/pnp4nagios/var/host-perfdata
[OK  ]  host_perfdata_file_template is defined
[OK  ]  host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$
[OK  ]  PERFDATA template looks good
[OK  ]  host_perfdata_file_mode is defined
[OK  ]  host_perfdata_file_mode=a
[OK  ]  host_perfdata_file_processing_interval is defined
[OK  ]  host_perfdata_file_processing_interval=15
[OK  ]  host_perfdata_file_processing_command is defined
[OK  ]  host_perfdata_file_processing_command=process-host-perfdata-file
[INFO]  Nagios config looks good so far
[INFO]  ========== Checking config values ============
[OK  ]  npcd daemon is running
[OK  ]  /usr/local/pnp4nagios/etc/npcd.cfg is used by npcd and readable
[INFO]  Reading /usr/local/pnp4nagios/etc/npcd.cfg
[OK  ]  perfdata_spool_dir is defined
[OK  ]  perfdata_spool_dir=/usr/local/pnp4nagios/var/spool
[OK  ]  2 files found in /usr/local/pnp4nagios/var/spool
service_perfdata_file_processing_command at /root/verify_pnp_config line 462.
[OK  ]  Command process-service-perfdata-file is defined
[OK  ]  '/bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$'
[OK  ]  Command looks good
host_perfdata_file_processing_command at /root/verify_pnp_config line 462.
[OK  ]  Command process-host-perfdata-file is defined
[OK  ]  '/bin/mv /usr/local/pnp4nagios/var/host-perfdata /usr/local/pnp4nagios/var/spool/host-perfdata.$TIMET$'
[OK  ]  Command looks good
[OK  ]  Script /usr/local/pnp4nagios/libexec/process_perfdata.pl is executable
[INFO]  ========== Starting global checks ============
[OK  ]  status_file is defined
[OK  ]  status_file=/usr/local/nagios/var/status.dat
[INFO]  host_query = 
[INFO]  service_query = 
[INFO]  Reading /usr/local/nagios/var/status.dat
[INFO]  ==== Starting rrdtool checks ====
[OK  ]  RRDTOOL is defined
[OK  ]  RRDTOOL=/bin/rrdtool
[OK  ]  /bin/rrdtool is executable
[OK  ]  RRDtool 1.4.8  Copyright 1997-2013 by Tobias Oetiker <tobi@oetiker.ch>
[OK  ]  USE_RRDs is defined
[OK  ]  USE_RRDs=1
[OK  ]  Perl RRDs modules are loadable
[INFO]  ==== Starting directory checks ====
[OK  ]  RRDPATH is defined
[OK  ]  RRDPATH=/usr/local/pnp4nagios/var/perfdata
[OK  ]  Perfdata directory '/usr/local/pnp4nagios/var/perfdata' exists
[WARN]  4 hosts/services are not providing performance data
[WARN]  'process_perf_data 1' is set for 5 hosts/services which are not providing performance data!
[OK  ]  'process_perf_data 1' is set for 19 of your hosts/services
[INFO]  ==== System sizing ====
[OK  ]  18 hosts/service objects defined
[INFO]  ==== Check statistics ====
[WARN]  Warning: 2, Critical: 0
[WARN]  Checks finished...
This is I'd done with commands.cfg

Code: Select all

 'check_iftraffic' command definition
define command{
        command_name    check_iftraffic64
        command_line    $USER1$/check_iftraffic64.pl -H $HOSTADDRESS$ -C $ARG1$ -i $ARG2$ -r -b 1000 -u m -B -f
        }
This is I'd done with switch.cfg

Code: Select all

define host{
	use             generic-switch,host-pnp         ; Inherit default values from a template
        host_name	NPRDPUKHASW01         ; The name we're giving to this switch
        alias           NPRDPUKHASW01 Switch  ; A longer name associated with the switch
        address         192.168.99.253           ; IP address of the switch
        hostgroups	switches                ; Host groups this switch is associated with
        }

define service {
        use                     generic-service,srv-pnp ; Inherit values from a template
        host_name               NPRDPUKHASW01
       	service_description     Gi1/0/3 Traffic Load
        check_command           check_iftraffic64!<XXXXXX>!GigabitEthernet1/0/3
        max_check_attempts      3
        normal_check_interval   5
        retry_check_interval    5
        }
This is from resource.cfg

Code: Select all

# Sets $USER1$ to be the path to the plugins
$USER1$=/usr/local/nagios/libexec
Please help me :cry: :cry: :cry:
I had attached nagios.cfg, if want any file or verify more please tell me.

A switch is Cisco Catalyst 2960-X. I use Nagios Core 4.2.4, Nagios Plugin 2.1.4, PNP4Nagios-0.6.24.

Thank you very much.
Attachments
nagios.cfg
(44.53 KiB) Downloaded 336 times
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: check_iftraffic64 (No output on stdout) stderr:

Post by avandemore »

Please do not post duplicate threads.

https://support.nagios.com/forum/viewtopic.php?t=41869
Previous Nagios employee
Locked