Page 2 of 2

Re: Problems scheduling downtime

Posted: Fri Aug 21, 2020 9:02 am
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.

Re: Problems scheduling downtime

Posted: Fri Aug 21, 2020 4:35 pm
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

Re: Problems scheduling downtime

Posted: Fri Sep 18, 2020 10:11 am
by NAGIOS SUPPORT ADMIN
Any new information on this issue? I sent the profile in some time ago.
Thanks.

Re: Problems scheduling downtime

Posted: Sat Sep 19, 2020 10:27 am
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

Re: Problems scheduling downtime

Posted: Mon Sep 21, 2020 6:13 am
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.

Re: Problems scheduling downtime

Posted: Mon Sep 21, 2020 4:23 pm
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

Re: Problems scheduling downtime

Posted: Tue Sep 22, 2020 1:02 pm
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.

Re: Problems scheduling downtime

Posted: Tue Sep 22, 2020 1:57 pm
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