Problems scheduling downtime

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
NAGIOS SUPPORT ADMIN
Posts: 10
Joined: Fri Aug 07, 2020 1:31 pm

Re: Problems scheduling downtime

Post by NAGIOS SUPPORT ADMIN »

I will work on redacting the profile. It may take some time as there seems to be a lot of log files.
I will add the log as soon as I have it redacted.
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Problems scheduling downtime

Post by jbrunkow »

I appreciate that. Please reply to this thread to raise the topic in our queue. I will then analyze the profile to try to determine what the issue is.

Thanks
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!
NAGIOS SUPPORT ADMIN
Posts: 10
Joined: Fri Aug 07, 2020 1:31 pm

Re: Problems scheduling downtime

Post by NAGIOS SUPPORT ADMIN »

Any new information on this issue? I sent the profile in some time ago.
Thanks.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Problems scheduling downtime

Post by benjaminsmith »

Hi,

Very sorry about the delay, I reviewed the system profile and it looks pretty clean, except I noticed the following entry in the database log. If the following table was crashed, that may explain why you were having trouble sending commands to Core.

Code: Select all

170928 15:10:02 [Warning] Checking table:   './nagios/nagios_systemcommands'
170928 15:10:02 [ERROR] mysqld: Table './nagios/nagios_customvariablestatus' is marked as crashed and should be repaired
Let's go ahead and run the databse repair script. Log in as root and run the following command:

Code: Select all

/usr/local/nagiosxi/scripts/repair_databases.sh
Then go back to the host details are and try to schedule downtime. If this still fails, let's try once more in the Naigos Core interface,
http://<server-ip-address/nagios/, to determine whether this is a database/php issue or file permissions. Let me know the results and post any errors you receive to the thread.
downtime.png
Regards,
Benjamin
You do not have the required permissions to view the files attached to this post.
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!
NAGIOS SUPPORT ADMIN
Posts: 10
Joined: Fri Aug 07, 2020 1:31 pm

Re: Problems scheduling downtime

Post by NAGIOS SUPPORT ADMIN »

When I attempt to schedule the downtime in Nagios Core I get:
Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!
The permissions on the external command file and/or directory may be incorrect. Read the FAQs on how to setup proper permissions.
An error occurred while attempting to commit your command for processing.

I still receive the same error when scheduling the downtime in Nagios XI.
One or more scheduled commands could not be sent to Nagios Core.

Based on the error message with the scheduling in Nagios Core it does seem like a permissions issue.

Please advise on a way forward.
Thank you.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Problems scheduling downtime

Post by benjaminsmith »

Hi,

Thanks. Let's check the permission on that file.

Code: Select all

ls -l /usr/local/nagios/var/rw/nagios.cmd
It should have the following output:

Code: Select all

[root@localhost ~]# ls -l /usr/local/nagios/var/rw/nagios.cmd
prw-rw---- 1 nagios nagcmd 0 Sep 21 15:14 /usr/local/nagios/var/rw/nagios.cm
If that is not correct, please try running the following command and check the permissions again.

Code: Select all

chmod g+s /usr/local/nagios/var/rw/
Next, make sure the nagios user account and the apache user account is added to the nagcmd group and the nagios group on the server.
To do this, edit the following file:

Code: Select all

/etc/group
And make sure the nagios and nagcmd groups are configured like the example below.

Code: Select all

nagios:x:1000:nagios,apache
nagcmd:x:1001:nagios,apache
Benjamin
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!
NAGIOS SUPPORT ADMIN
Posts: 10
Joined: Fri Aug 07, 2020 1:31 pm

Re: Problems scheduling downtime

Post by NAGIOS SUPPORT ADMIN »

apache was not part of the nagcmd group. I added it to the group and restarted the server and this resolved this issue. Additionally this resolved a problem I was having with acknowledging an outage.
Thank you for your assistance.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problems scheduling downtime

Post by scottwilkerson »

NAGIOS SUPPORT ADMIN wrote:apache was not part of the nagcmd group. I added it to the group and restarted the server and this resolved this issue. Additionally this resolved a problem I was having with acknowledging an outage.
Thank you for your assistance.
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked