Bulk Modification Tool. It doesn't remove free variables.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jmsanesteban.sgre
Posts: 51
Joined: Thu Apr 23, 2020 6:46 am

Re: Bulk Modification Tool. It doesn't remove free variables

Post by jmsanesteban.sgre »

tgriep wrote:Are you using the Dell tool in Nagios?
Yes and no, we are using that plugin to monitor remotely the health of other servers.
tgriep wrote: Can you provide more details about the extended permissions for nagios user.

Code: Select all

# file: usr/local/nagios/dell/
# owner: nagios
# group: nagios
user::rwx
user:nagios:rw-
group::r-x
mask::rwx
other::rwx
The rest of directories till reach the requested file is the same. As you've requested the permissions list I don't add that info here.

I add here the the file that generate the reading error:

Code: Select all

# file: usr/local/nagios/dell/config/templates/dell_contacts.cfg
# owner: nagios
# group: nagios
user::rwx
user:nagios:rw-
group::---
mask::rw-
other::r-x
tgriep wrote: Could you post or PM me your Nagios XI System Profile so we can review it?
To get your system profile. Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and upload it to the ticket by clicking the "choose item" link at the bottom of the menu.
Profile sent (PM)
tgriep wrote:Also, run the following as root and post or PM me the /tmp/info.txt file.

Code: Select all

chage -l nagios >/tmp/info.txt
grep nag /etc/group >>/tmp/info.txt
ls -alR /usr/local/nagios >>/tmp/info.txt
info.txt file sent (PM)
tgriep wrote: Open a root shell to the Nagios server, run the following command and upload the /tmp/nagiosql.sql to the ticket so I can see the setting in the CCM.

Code: Select all

mysqldump nagiosql -u root -pnagiosxi >/tmp/nagiosql.sql
Nagiosql dump sent (PM)
tgriep wrote: About removing the data from the database. We do not support or suggest doing any data manipulation of the database.
If there are any errors, data loss, that could render the system unstable.

Thank you.
I fully understand what you are saying about doing changes directly to the database, but the system is working in a strange way, as I mentioned before.

Regarding the plugin and the permissions, with the current permission set, no problems appears when we apply the changes, although Nagios informs about some permissions problems because it can't check them with the user Nagios, so apart from using the correct permissions set or see the error in CCM -> Config File Management -> Verify files, there is no futher problems with that.

Thanks for your help.

BR,
Juanma.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Bulk Modification Tool. It doesn't remove free variables

Post by tgriep »

It could be the extended permissions on the files and folders that is not allowing nagios / apache to read the files but the owner-group should be changed to the following.

Code: Select all

chown -R apache.nagios /usr/local/nagios/dell
If there is some sort of policy or application that maintains the extended permissions for the files and folders, see if that is blocking the ability to read the files and folders.

Thank you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jmsanesteban.sgre
Posts: 51
Joined: Thu Apr 23, 2020 6:46 am

Re: Bulk Modification Tool. It doesn't remove free variables

Post by jmsanesteban.sgre »

tgriep wrote:It could be the extended permissions on the files and folders that is not allowing nagios / apache to read the files but the owner-group should be changed to the following.

Code: Select all

chown -R apache.nagios /usr/local/nagios/dell
Using those permissions we still suffer problems, because or it can write or it can read, but not both, however, using the permissions below, everything is working well at least in regards of "verify files" or "apply configuration" options:

Code: Select all

/usr/local/nagios/dell -> apache.nagios
/usr/local/nagios/dell/config -> nagios.
/usr/local/nagios/dell/config/templates -> nagios.
/usr/local/nagios/dell/config/templates/* -> apache.nagios
tgriep wrote: If there is some sort of policy or application that maintains the extended permissions for the files and folders, see if that is blocking the ability to read the files and folders.

Thank you.
I think that those extended permissions came from the plugin configuration. In any case, just to confirm, as you said, using NDO3, after applying new configuration, we've stopped inserting the macros, so our main problem is solved :)

PS: The problem for users that keep using the older version, the problem will persist. the unique way to disable them is running the same queries that BMT runs internally, but as @tgriep said, it is not recommended by Nagios.

Thank you very much for your time and effort.

BR,
Juanma.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Bulk Modification Tool. It doesn't remove free variables

Post by tgriep »

Your welcome. Glad everything is working for you now.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked