Hi,
Am trying to use the check_by_ssh using the below command:
./check_by_ssh -fqv -H remoteserver -C [ "sudo", "mysql -uusernamehere -ppasswordhere -s -e "use radius; select * from radacct WHERE acctstoptime IS NULL;" |wc -l" ]
and am getting the below:
-su: syntax error near unexpected token `from'
also when trying
./check_by_ssh -H remoteserver -p 22 -fqv -C [ "mysql -uusernamehere -ppasswordhere -s -e 'SELECT * FROM 'radius'.'radacct' WHERE acctstoptime IS NULL;' | wc -l" ]
am getting:
check_by_ssh: No remotecmd
the server where I am connecting is an ubuntu server.
as for the identity I have created a public key under /root/.ssh/id of the remote server
Can someone help? please
Thanks:)
by_ssh plugin issue
Re: by_ssh plugin issue
issue solved by doing the count from mysql itsfel, but it would be great if we could use this as the reply I wanted in my case was just 1 number and not that the query is ok etc..
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: by_ssh plugin issue
Hi pizu,
Sounds like you got it figured out, so we'll mark this as resolved.
If you looking for different output to Nagios, you might want to consider writing a simple plugin or wrapper script for this check.
Sounds like you got it figured out, so we'll mark this as resolved.
If you looking for different output to Nagios, you might want to consider writing a simple plugin or wrapper script for this check.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!