Page 2 of 2

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

Posted: Thu Jan 02, 2020 5:20 pm
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?

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

Posted: Fri Jan 03, 2020 11:18 am
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.

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

Posted: Fri Jan 03, 2020 11:46 am
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