Page 2 of 2

Re: Nagios plugins - interfacetable_v3t issues

Posted: Wed Mar 21, 2018 6:41 pm
by charpham
Hmm.. I am baffled by this.. I have made all these adjustments, I still have the same problem.. thanks for all your help I really appreciate.. I beginning to wonder if there might a more "recent" plugin that will do the same..

Here is my pre-flight check
[root@terminus objects]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.3.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2017-08-24
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...
Error: Service check command 'check_interface_table_v3t.pl -H charpham-3548-1 -C v14tual -2 -f --cachedir /usr/local/nagios/etc/.ifCache' specified in service 'Interface status' for host 'charpham-3548' not defined anywhere!
Checked 40 services.
Checked 8 hosts.
Checked 3 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 8 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: 1

Here are the permissions for the cachedir
[root@terminus etc]# ls -al
total 140
drwxrwxr-x. 4 nagios nagios 168 Mar 19 12:41 .
drwxr-xr-x. 9 root root 94 Jan 5 15:29 ..
-rw-rw-r-- 1 nagios nagios 12999 Jan 23 14:14 cgi.cfg
-rw-rw-r--. 1 nagios nagios 12999 Dec 21 14:17 cgi.cfg~
-rw-r--r--. 1 root root 50 Dec 26 15:13 htpasswd.users
drwxrwxrwx 3 nagios nagios 22 Mar 19 12:41 .ifCache
-rw-rw-r-- 1 nagios nagios 45175 Jan 21 16:00 nagios.cfg
-rw-rw-r--. 1 nagios nagios 44816 Dec 21 14:17 nagios.cfg~
drwxrwxr-x. 2 nagios nagios 4096 Mar 21 16:23 objects
-rw-rw---- 1 nagios nagios 1312 Dec 26 15:12 resource.cfg
-rw-rw----. 1 nagios nagios 1312 Dec 21 14:17 resource.cfg~

[root@terminus etc]# cd .ifCache
[root@terminus .ifCache]# ls -l
total 0
drwxrwxrwx 4 nagios nagios 41 Mar 19 12:41 10.1.0.2

here is my nagios.cfg - note the
# OBJECT CONFIGURATION FILE(S)
# These are the object configuration files in which you define hosts,
# host groups, contacts, contact groups, services, etc.
# You can split your object definitions across several config files
# if you wish (as shown below), or keep them all in a single config file.



# Definitions for monitoring a router/switch
cfg_file=/usr/local/nagios/etc/objects/switch.cfg
cfg_file=/usr/local/nagios/etc/objects/charpham-3548.cfg

Re: Nagios plugins - interfacetable_v3t issues

Posted: Fri Mar 23, 2018 9:03 am
by kyang
Did you define the command in the commands.cfg?

Code: Select all

/usr/local/nagios/etc/objects/commands.cfg
Error: Service check command 'check_interface_table_v3t.pl -H charpham-3548-1 -C v14tual -2 -f --cachedir /usr/local/nagios/etc/.ifCache' specified in service 'Interface status' for host 'charpham-3548' not defined anywhere!
Could you post the host/service cfg and your commands.cfg?

Re: Nagios plugins - interfacetable_v3t issues

Posted: Thu Apr 05, 2018 4:01 pm
by charpham
Hi Thanks for the response.

Here is the relevant info in the commands.cfg

################################################################################
#
# SAMPLE PERFORMANCE DATA COMMANDS
#
# These are sample performance data commands that can be used to send performance
# data output to two text files (one for hosts, another for services). If you
# plan on simply writing performance data out to a file, consider using the
# host_perfdata_file and service_perfdata_file options in the main config file.
#
################################################################################

#checking router and switch interface info
define command{
command_name check_interface_table_v3t
command_line /usr/local/nagios/libexec/check_interface_table_v3t.pl -H $HOSTADDRESS$ -C $ARG1$ $ARG2$
}



Here is the info from the host.cfg (charpham-3548.cfg)
# monitoring inteface stats using plugin - check_interface_v3t
define service{
use generic-service ; Inherit values from a template
host_name charpham-3548-1
service_description Interface status
check_command check_interface_table_v3t.pl -H charpham-3548-1 -C v14tual -2 -f --cachedir /usr/local/nagios/etc/.ifCache


Here is the info from nagios.cfg


# Definitions for monitoring a router/switch
cfg_file=/usr/local/nagios/etc/objects/switch.cfg
cfg_file=/usr/local/nagios/etc/objects/charpham-3548.cfg

thanks for your help

Re: Nagios plugins - interfacetable_v3t issues

Posted: Fri Apr 06, 2018 11:08 am
by kyang

Code: Select all

command_line /usr/local/nagios/libexec/check_interface_table_v3t.pl -H $HOSTADDRESS$ -C $ARG1$ $ARG2$

check_command check_interface_table_v3t.pl -H charpham-3548-1 -C v14tual -2 -f --cachedir /usr/local/nagios/etc/.ifCache
Looking at this, you don't seem to be using the (!) delimiter in your check_command.
https://assets.nagios.com/downloads/nag ... acros.html

Try something like this. (Since you have -H and -C in your command_line you don't need to add it into the check_command.)
You may have to play around with it if it does not work.

Code: Select all

check_command check_interface_table_v3t.pl!charpham-3548-1!v14tual!-2 -f --cachedir /usr/local/nagios/etc/.ifCache

Re: Nagios plugins - interfacetable_v3t issues

Posted: Wed Apr 11, 2018 7:10 pm
by charpham
Thanks for you info and help on this.. This still does not work.. I get the same error.. Since this a rather old plugin I think I will go a different route... I found a "newer" plugin and will try this one.. cross my fingers I can get this one to work..

again thanks all for your help..

much appreciated.



I think I will try this from the following link
http://www.techspacekh.com/monitoring-c ... plication/

Re: Nagios plugins - interfacetable_v3t issues

Posted: Thu Apr 12, 2018 8:27 am
by scottwilkerson
Let us know how the new plugin turns out

Re: Nagios plugins - interfacetable_v3t issues

Posted: Thu Apr 19, 2018 5:37 pm
by charpham
This other plugin works fine.. although it doesn't have some of the nice features that "interfacetable_v3t " has...

Re: Nagios plugins - interfacetable_v3t issues

Posted: Fri Apr 20, 2018 9:19 am
by scottwilkerson
Glad you were able to get the other plugin working.