Command line vs gui commands
Command line vs gui commands
/usr/local/nagios/libexec/cisco_ucs_nagios -H <IP> -u <user> -p <password> -t dn -q 'sys/chassis-1/blade-1'
When I run this on the command line it works fine even as the nagios user but in the web interface, and when applied, I get the result as:
(No output on stdout) stderr: Traceback (most recent call last):
is it the dashes or the / causing an issue?
When I run this on the command line it works fine even as the nagios user but in the web interface, and when applied, I get the result as:
(No output on stdout) stderr: Traceback (most recent call last):
is it the dashes or the / causing an issue?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Command line vs gui commands
My guess would be maybe a special char in the username/password like \/ $ or !
Re: Command line vs gui commands
I gave it a simple password for testing so it doesn't have special characters in the password nor username field at this time.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Command line vs gui commands
Can you run this as the nagios user?
Code: Select all
su nagios -c "/usr/local/nagios/libexec/cisco_ucs_nagios -H <IP> -u <user> -p <password> -t dn -q 'sys/chassis-1/blade-1'"Re: Command line vs gui commands
yes I can.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Command line vs gui commands
Do you get text on the first line when running the plugin? This is required for Nagios plugins
when you run the plugin does it skip a line or more?
Like
instead of
when you run the plugin does it skip a line or more?
Like
Code: Select all
# /usr/local/nagios/libexec/cisco_ucs_nagios -H <IP> -u <user> -p <password> -t dn -q 'sys/chassis-1/blade-1'
Plugin outputCode: Select all
# /usr/local/nagios/libexec/cisco_ucs_nagios -H <IP> -u <user> -p <password> -t dn -q 'sys/chassis-1/blade-1'
Plugin outputRe: Command line vs gui commands
Sent you a PM
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Command line vs gui commands
respondedemartine wrote:Sent you a PM
When you are testing the command from the CLI you have
Code: Select all
'sys/chassis-1/blade-1'Code: Select all
sys/chassis-1/blade-1Re: Command line vs gui commands
I've tried with single, double and without quotes over the GUI. I've also tried escaping the /
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Command line vs gui commands
Curious, does it just fail when testing from the CCM or does it also fail if you setup the service?
I ask because there is some escaping that the CCM must to to prevent security vulnerabilities, but the check may run when actually setup.
Additionally, do you get any output when you look at the service detail page?
I ask because there is some escaping that the CCM must to to prevent security vulnerabilities, but the check may run when actually setup.
Additionally, do you get any output when you look at the service detail page?