One or more scheduled commands could not be sent to Nagios C
One or more scheduled commands could not be sent to Nagios C
Good morning
We are running into this issue again after our most recent upgrade.
One or more scheduled commands could not be sent to Nagios Core.
I also tried to pull my profile. I got this error message.
PROFILE BUILD FAILED
Array
(
)
CODE: 1
We are running into this issue again after our most recent upgrade.
One or more scheduled commands could not be sent to Nagios Core.
I also tried to pull my profile. I got this error message.
PROFILE BUILD FAILED
Array
(
)
CODE: 1
Last edited by jsalsbury on Thu Jan 02, 2020 2:22 pm, edited 1 time in total.
Re: One or more scheduled commands could not be sent to Nagi
Can you give us a little bit more details on that? What command are you sending to Nagios Core? What is the error that you are seeing in the GUI? A screenshot would be helpful.One or more scheduled commands could not be sent to Nagios Core.
As far as the profile issues goes, please follow the steps, outlined in the KB article below:
https://support.nagios.com/kb/article/n ... d-533.html
Let us know if this fixed the issue for you. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: One or more scheduled commands could not be sent to Nagi
Hello, Happy New year, thanks in advance for the help.
I was trying to schedule downtime from the home screen.
I attempted to run the commands and had an issue with the CAT portion
root@peplap02192:~# cd tmp/
root@peplap02192:~/tmp# tar xzf xi-5.6.3.tar.gz nagiosxi/nagiosxi/nagiosxi.sudoers --strip-components 2
root@peplap02192:~/tmp# grep -v NAGIOSXI /etc/sudoers > /etc/sudoers.new
root@peplap02192:~/tmp# mv -f /etc/sudoers.new /etc/sudoers
root@peplap02192:~/tmp# rm -rf /etc/sudoers.d/nagiosxi
root@peplap02192:~/tmp# sed -i 's/^Defaults requiretty/#Defaults requiretty/g' /etc/sudoers
root@peplap02192:~/tmp# cat /tmp/nagiosxi.sudoers >> /etc/sudoers
cat: /tmp/nagiosxi.sudoers: No such file or directory
root@peplap02192:~/tmp# chmod 440 /etc/sudoers
root@peplap02192:~/tmp# cd ..
root@peplap02192:~# cd etc
-bash: cd: etc: No such file or directory
root@peplap02192:~# ls
all_hosts.txt IEM3
I was trying to schedule downtime from the home screen.
I attempted to run the commands and had an issue with the CAT portion
root@peplap02192:~# cd tmp/
root@peplap02192:~/tmp# tar xzf xi-5.6.3.tar.gz nagiosxi/nagiosxi/nagiosxi.sudoers --strip-components 2
root@peplap02192:~/tmp# grep -v NAGIOSXI /etc/sudoers > /etc/sudoers.new
root@peplap02192:~/tmp# mv -f /etc/sudoers.new /etc/sudoers
root@peplap02192:~/tmp# rm -rf /etc/sudoers.d/nagiosxi
root@peplap02192:~/tmp# sed -i 's/^Defaults requiretty/#Defaults requiretty/g' /etc/sudoers
root@peplap02192:~/tmp# cat /tmp/nagiosxi.sudoers >> /etc/sudoers
cat: /tmp/nagiosxi.sudoers: No such file or directory
root@peplap02192:~/tmp# chmod 440 /etc/sudoers
root@peplap02192:~/tmp# cd ..
root@peplap02192:~# cd etc
-bash: cd: etc: No such file or directory
root@peplap02192:~# ls
all_hosts.txt IEM3
You do not have the required permissions to view the files attached to this post.
Re: One or more scheduled commands could not be sent to Nagi
Thanks! Happy New year to you too!Hello, Happy New year, thanks in advance for the help.
What is the error that you see in the GUI? Screenshot?I was trying to schedule downtime from the home screen.
Run the following commands and show the output:
Code: Select all
chage -l nagios
chage -l apache
grep nag /etc/group
This is strange. The command below, should've extracted the "nagiosxi.sudoers" file:cat: /tmp/nagiosxi.sudoers: No such file or directory
Code: Select all
tar xzf xi-5.6.3.tar.gz nagiosxi/nagiosxi/nagiosxi.sudoers --strip-components 2
Code: Select all
cd /tmp
ls -la
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: One or more scheduled commands could not be sent to Nagi
root@peplap02192:~/tmp# chage -l nagios
Last password change : Oct 25, 2016
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
root@peplap02192:~/tmp# chage -l apache
Last password change : Oct 24, 2016
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : -1
Maximum number of days between password change : -1
Number of days of warning before password expires : -1
root@peplap02192:~/tmp# grep nag /etc/group
nagiosse43899:
splunkse43628:nagiosse,splunkse
apache48:nagios,snmptt
nagios40601:nagios,snmptt,apache
nagcmd43900:snmptt
snmptt986:nagios
total 56512
drwxr-x--- 2 root root 4096 Jan 2 13:12 .
dr-xr-x---. 20 root root 4096 Dec 16 14:48 ..
-r--r--r-- 1 root root 2 Mar 21 2017 disable~
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.chkconfig
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.crontabs
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.dbbackups
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.dbservers
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.firewall
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.mrtg
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.mysql
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.nagiosxi
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.phplimits
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.prereqs
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.repos
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.selinux
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.services
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.sourceguardian
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.subcomponents
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.sudoers
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.timezone
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.usersgroups
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.xidb
-rw-r--r-- 1 root root 2054 Jun 10 2019 nagiosxi.sudoers
Last password change : Oct 25, 2016
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
root@peplap02192:~/tmp# chage -l apache
Last password change : Oct 24, 2016
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : -1
Maximum number of days between password change : -1
Number of days of warning before password expires : -1
root@peplap02192:~/tmp# grep nag /etc/group
nagiosse43899:
splunkse43628:nagiosse,splunkse
apache48:nagios,snmptt
nagios40601:nagios,snmptt,apache
nagcmd43900:snmptt
snmptt986:nagios
total 56512
drwxr-x--- 2 root root 4096 Jan 2 13:12 .
dr-xr-x---. 20 root root 4096 Dec 16 14:48 ..
-r--r--r-- 1 root root 2 Mar 21 2017 disable~
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.chkconfig
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.crontabs
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.dbbackups
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.dbservers
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.firewall
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.mrtg
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.mysql
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.nagiosxi
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.phplimits
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.prereqs
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.repos
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.selinux
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.services
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.sourceguardian
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.subcomponents
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.sudoers
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.timezone
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.usersgroups
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.xidb
-rw-r--r-- 1 root root 2054 Jun 10 2019 nagiosxi.sudoers
You do not have the required permissions to view the files attached to this post.
Re: One or more scheduled commands could not be sent to Nagi
This doesn't seem like a "clean" (vanilla) system. You have some "custom" entries in the /etc/group file, e.g. nagiosse and splunkse... Also, your nagcmd group doesn't have nagios and apache added to it. Most likely, this is why you are not able to submit commands. Open the /etc/group in a text editor, and change this:
to this:
Since you didn't show us the actual commands that you run when listing the directory (just showed the output), I am not sure what directory you were in... Were you in /tmp when you run "ls -la"? Is this the entire output? I see three issues with this output:
1. The "installed.xxx" files should not be in the /tmp directory, but in /tmp/nagiosxi...
2. The "xi-5.6.3.tar.gz" file is missing.
3. The "nagiosxi.sudoers" is present, but you cannot cat it?!
Code: Select all
nagcmd:x:43900:snmptt
Code: Select all
nagcmd:x:43900:nagios,apache,snmptt
1. The "installed.xxx" files should not be in the /tmp directory, but in /tmp/nagiosxi...
2. The "xi-5.6.3.tar.gz" file is missing.
3. The "nagiosxi.sudoers" is present, but you cannot cat it?!
Can you double-check the paths and the files in /tmp? You may try removing all files from the /tmp directory, and rerunning the commands, listed in our KB article - https://support.nagios.com/kb/article/n ... d-533.html on the topic.root@peplap02192:~/tmp# cat /tmp/nagiosxi.sudoers >> /etc/sudoers
cat: /tmp/nagiosxi.sudoers: No such file or directory
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: One or more scheduled commands could not be sent to Nagi
The files are where they should be, looks like I just did a bad copy and paste
root@peplap02192:~/tmp# ls -la
total 56512
drwxr-x--- 2 root root 4096 Jan 2 13:12 .
dr-xr-x---. 20 root root 4096 Dec 16 14:48 ..
-r--r--r-- 1 root root 2 Mar 21 2017 disable~
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.chkconfig
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.crontabs
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.dbbackups
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.dbservers
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.firewall
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.mrtg
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.mysql
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.nagiosxi
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.phplimits
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.prereqs
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.repos
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.selinux
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.services
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.sourceguardian
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.subcomponents
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.sudoers
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.timezone
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.usersgroups
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.xidb
-rw-r--r-- 1 root root 2054 Jun 10 2019 nagiosxi.sudoers
-rw-r----- 1 root root 57847979 Jun 10 2019 xi-5.6.3.tar.gz
root@peplap02192:~/tmp#
root@peplap02192:~/tmp# ls -la
total 56512
drwxr-x--- 2 root root 4096 Jan 2 13:12 .
dr-xr-x---. 20 root root 4096 Dec 16 14:48 ..
-r--r--r-- 1 root root 2 Mar 21 2017 disable~
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.chkconfig
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.crontabs
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.dbbackups
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.dbservers
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.firewall
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.mrtg
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.mysql
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.nagiosxi
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.phplimits
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.prereqs
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.repos
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.selinux
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.services
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.sourceguardian
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.subcomponents
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.sudoers
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.timezone
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.usersgroups
-rw-r--r-- 1 root root 0 Oct 25 2016 installed.xidb
-rw-r--r-- 1 root root 2054 Jun 10 2019 nagiosxi.sudoers
-rw-r----- 1 root root 57847979 Jun 10 2019 xi-5.6.3.tar.gz
root@peplap02192:~/tmp#
Re: One or more scheduled commands could not be sent to Nagi
I do not seem to have a sudoers folder under nagios etc
root@peplap02192:~/nagios-xi/etc# ls
yum.repos.d
root@peplap02192:~/nagios-xi/etc# ls
yum.repos.d
root@peplap02192:~/nagios-xi/etc#
root@peplap02192:~/nagios-xi/etc# ls
yum.repos.d
root@peplap02192:~/nagios-xi/etc# ls
yum.repos.d
root@peplap02192:~/nagios-xi/etc#
Re: One or more scheduled commands could not be sent to Nagi
Your sudoers should be in "/etc/sudoers", NOT in "/root/nagios-xi/etc". Have you modified your system from the "default", e.g. using custom paths, etc.?
Can you post your sudoers file?
Can you post your sudoers file?
Code: Select all
cat /etc/sudoers
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: One or more scheduled commands could not be sent to Nagi
No special pathing was implemented to my knowledge. We did have this issue in the past perhaps it is logged somewhere in my last ticket?
Attached is my sudo file
Attached is my sudo file
You do not have the required permissions to view the files attached to this post.