Page 1 of 1
Syntax error plugin check_ucs
Posted: Fri Feb 15, 2019 9:39 am
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,
Re: Syntax error plugin check_ucs
Posted: Fri Feb 15, 2019 10:31 am
by scottwilkerson
Your command defined is using the community string belice but your test from the command line is using the community string public
Re: Syntax error plugin check_ucs
Posted: Fri Feb 15, 2019 10:40 am
by alex3105
By changing the community, the problem remains ..
Re: Syntax error plugin check_ucs
Posted: Fri Feb 15, 2019 2:53 pm
by scottwilkerson
alex3105 wrote:By changing the community, the problem remains ..
Did you restart nagios after making the change?
Re: Syntax error plugin check_ucs
Posted: Fri Feb 15, 2019 4:58 pm
by alex3105
Restarting the service the problem remains ... it must be a syntax error .. I will keep trying ..
Re: Syntax error plugin check_ucs
Posted: Fri Feb 15, 2019 5:06 pm
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
Re: Syntax error plugin check_ucs
Posted: Fri Feb 15, 2019 5:17 pm
by alex3105
Executing the command I get:
Total warnings: 0
Total Errors: 0
I'm going to review a possible duplicity,
Re: Syntax error plugin check_ucs
Posted: Mon Feb 18, 2019 10:21 am
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
Re: Syntax error plugin check_ucs
Posted: Mon Feb 18, 2019 4:39 pm
by ssax
Thanks for the update, are we okay to mark this as resolved and lock the topic?