Custom check works in CLI, as nagios user, but not in XI
Custom check works in CLI, as nagios user, but not in XI
I have created a check that checks if a file can be uploaded and downloaded from sftp server. We use an ssh key to connect. It works perfectly fine when I run it as the nagios user in CLI. When I run the check in XI in either the ccm or applied to the configuration, it fails on each check. Is there something in need to do with the ssh key for it to work within Nagios like it does on the CLI?
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Custom check works in CLI, as nagios user, but not in XI
Hello @brudnick,
When you run the check command from the Nagios XI server, are you logged in as root or the nagios user?
If you are executing the plugin over ssh, you'll need to setup passwordless login for the nagios user account. See the guide below for step-by-step instructions.
Monitoring Hosts Using SSH
When you run the check command from the Nagios XI server, are you logged in as root or the nagios user?
If you are executing the plugin over ssh, you'll need to setup passwordless login for the nagios user account. See the guide below for step-by-step instructions.
Monitoring Hosts Using SSH
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!
Re: Custom check works in CLI, as nagios user, but not in XI
Lock the post. I figured it out. It had to do with the folder Nagios XI was reading/writing the file to.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Custom check works in CLI, as nagios user, but not in XI
Hello @brudnick,
Thank you for using the Nagios Support Forum.
Good to hear. We'll close this one up.Lock the post. I figured it out. It had to do with the folder Nagios XI was reading/writing the file to.
Thank you for using the Nagios Support Forum.
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!