One or more scheduled commands could not be sent to Nagios C

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: One or more scheduled commands could not be sent to Nagi

Post by lmiltchev »

What is the version of Nagios XI that you are currently using? I see that you have the following in the sudoers:

Code: Select all

NAGIOSXI        ALL = NOPASSWD:NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
NAGIOSXIWEB     ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
but you should have (at least, in the newer version of Nagios XI) this:

Code: Select all

NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/components/getprofile.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/components/getprofile.sh
Also, you need to add this line:

Code: Select all

Defaults:nagios !requiretty
This should help you get the profile.

Did you add nagios and apache to the nagcmd group? Are you able to schedule downtime now?
Be sure to check out our Knowledgebase for helpful articles and solutions!
jsalsbury
Posts: 87
Joined: Tue Oct 23, 2018 12:57 pm

Re: One or more scheduled commands could not be sent to Nagi

Post by jsalsbury »

We updated to the most recent Nagios a week or so ago. So we are current.
I have not made those changes to the text editor yet. Is this something I can do with a VI command? I am still quite new to Linux.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: One or more scheduled commands could not be sent to Nagi

Post by lmiltchev »

I believe you will need to talk to you sysadmin guy first, as in your sudoers it says:
This is a distributed sudoers file. Do not update locally.
This is not something that we did (it has nothing to do with Nagios XI) - it's on your end. If you modified this file "locally", it could be simple overwritten later, so again, talk to your sysadmin first.

However, if you decided to go ahead, and modify sudoers locally, it would be better if you used the visudo command from the command line. This way, you would not be allowed to save a sudoers with errors in it. It is a "safer" option. Once you type "visudo", and open the file, you can press "i" to enter the "insert" mode. Now, you will be able to type. After you are done with your mods, you will need press Esc in order to exit from the "insert" mode, then type:

Code: Select all

:wq
and hit Enter in order to save the file and exit.

See more on how to use "vi" here:

https://www.guru99.com/the-vi-editor.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked