Syntax error plugin check_ucs

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
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Syntax error plugin check_ucs

Post by alex3105 »

Dear

I have a problem with the check_ucs plugin to monitor Cisco equipment. In my team Centos 7 with Nagios Core 4.4.1 from the command window with the root user and nagios I have results but via web interface an error appears, so I would appreciate your support

[nagios@localhost libexec]$ ./check_ucs -H 192.168.1.250 -C public -T f -N switch
4 objects Ok



Best Regards,
Attachments
2.JPG
ucs1.cfg
(792 Bytes) Downloaded 263 times
commands.cfg
(334 Bytes) Downloaded 240 times
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Syntax error plugin check_ucs

Post by scottwilkerson »

Your command defined is using the community string belice but your test from the command line is using the community string public
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Re: Syntax error plugin check_ucs

Post by alex3105 »

By changing the community, the problem remains ..
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Syntax error plugin check_ucs

Post by scottwilkerson »

alex3105 wrote:By changing the community, the problem remains ..
Did you restart nagios after making the change?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Re: Syntax error plugin check_ucs

Post by alex3105 »

Restarting the service the problem remains ... it must be a syntax error .. I will keep trying ..
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Syntax error plugin check_ucs

Post by scottwilkerson »

You did post 2 different commands with different syntax

Code: Select all

define command{
        command_name    check_ucs_cisco
        command_line    $USER1$/check_ucs -H $ARG1$ $ARG2$ $ARG3$ $ARG4$
}

define command{
	command_name check_fan_fabric
	command_line /usr/local/nagios/libexec/check_ucs -H $HOSTADDRESS$ -C "$ARG1$" -T "$ARG2$" -N "$ARG3$" 
}
are you 100% sure that you don't have another service that is attached to a hostgroup that could be using the other command and overriding the one you shared?

This would show up as a Duplicate definition found for service ... if you run the config verification

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Re: Syntax error plugin check_ucs

Post by alex3105 »

Executing the command I get:

Total warnings: 0
Total Errors: 0

I'm going to review a possible duplicity,
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Re: Syntax error plugin check_ucs

Post by alex3105 »

Thanks for the support, I was able to solve the problem by following the link below.

https://support.nagios.com/forum/viewto ... or#p235621

Best Regards
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Syntax error plugin check_ucs

Post by ssax »

Thanks for the update, are we okay to mark this as resolved and lock the topic?
Locked