The environment is a naxios XI image deployed to VMware.
We are busy with a POC to determine if the product is suitable.
When I set up a windows wmi server for monitoring with the credentials in a text file the tool complains about permissions.
The file is under /home/nagios/.oppas and it is owned by apache and nagios.
When I set the check up with the normal wmi with the credentials typed out the host communication and the setup works but the checks fail due to syntax issues.
As the password complexity rules are quite strict the password does contain a ! .
When I then manually edit these checks and I point them at the credentials file they work fine, so permissions do not seem to be an issue.
Is there a specific location or permission set required on the wmi auth files ?
Unfortunately we have hundreds of windows hosts so manually fixing every service check is not an option.
WMI AUTH with text file not working on windows WMI wizard
Re: WMI AUTH with text file not working on windows WMI wizar
Where do you see this error? Could you show us a screenshot? If it was the wizard, it may have been permissions in the /home/nagios directory.When I set up a windows wmi server for monitoring with the credentials in a text file the tool complains about permissions.
The file is under /home/nagios/.oppas and it is owned by apache and nagios.
Are you able to get it working over the CLI as the nagios user? For example -
Code: Select all
[nagios@localhost libexec]$ ./check_wmi_plus.pl -H 192.168.47.8 -u 'wmiagent' -p 'wm14gent.' -m checkmem
OK - Physical Memory: Total: 4GB - Used: 614.051MB (15%) - Free: 3.4GB (85%)|'Physical Memory Used'=643878912Bytes; 'Physical Memory Utilisation'=15%;
Former Nagios Employee
Re: WMI AUTH with text file not working on windows WMI wizar
[root@localhost ~]# ls -la /home/nagios/.oppass
-r--r----- 1 apache nagios 50 Oct 10 12:51 /home/nagios/.oppass
-r--r----- 1 apache nagios 50 Oct 10 12:51 /home/nagios/.oppass
Re: WMI AUTH with text file not working on windows WMI wizar
Good morning
When I do the operations manually as the nagios user they work.
[nagios@localhost ~]$ whoami
nagios
[nagios@localhost ~]$ /usr/local/nagios/libexec/check_wmi_plus.pl -H 172.21.32.28 -A /home/nagios/.oppass -m checkprocess -s Commandline -a 'notepad.exe' -c ItemCount=1
OK - Found 0 Instance(s) of "notepad.exe" running (0 excluded). |'Process Count'=0; 'Excluded Process Count'=0;
[nagios@localhost ~]$ /usr/local/nagios/libexec/check_wmi_plus.pl -H 172.21.32.28 -u 'YOUI/username' -p 'complicated!@#password' -m checkprocess -s Commandline -a 'notepad.exe' -c ItemCount=1
OK - Found 0 Instance(s) of "notepad.exe" running (0 excluded). |'Process Count'=0; 'Excluded Process Count'=0;
[nagios@localhost ~]$
The issue comes in when running the configuration wizard.
The screenshots for those have been posted below. Regards
When I do the operations manually as the nagios user they work.
[nagios@localhost ~]$ whoami
nagios
[nagios@localhost ~]$ /usr/local/nagios/libexec/check_wmi_plus.pl -H 172.21.32.28 -A /home/nagios/.oppass -m checkprocess -s Commandline -a 'notepad.exe' -c ItemCount=1
OK - Found 0 Instance(s) of "notepad.exe" running (0 excluded). |'Process Count'=0; 'Excluded Process Count'=0;
[nagios@localhost ~]$ /usr/local/nagios/libexec/check_wmi_plus.pl -H 172.21.32.28 -u 'YOUI/username' -p 'complicated!@#password' -m checkprocess -s Commandline -a 'notepad.exe' -c ItemCount=1
OK - Found 0 Instance(s) of "notepad.exe" running (0 excluded). |'Process Count'=0; 'Excluded Process Count'=0;
[nagios@localhost ~]$
The issue comes in when running the configuration wizard.
The screenshots for those have been posted below. Regards
You do not have the required permissions to view the files attached to this post.
Re: WMI AUTH with text file not working on windows WMI wizar
This makes sense, as the actual checks will run as the nagios user. The problem here, is that the wizard is using the apache user, to try and access the /home/nagios folder. You would need to open the permissions up on this directory.
Could you either A. Move the file into a folder which all users have access, or B. Change permissions of the /home/nagios folder and let us know if that helps?
Could you either A. Move the file into a folder which all users have access, or B. Change permissions of the /home/nagios folder and let us know if that helps?
Former Nagios Employee
Re: WMI AUTH with text file not working on windows WMI wizar
Good Morning,
That resolved the issue.
And that makes perfect sense.
Thank you for that.
So these files should be accessible by user apache and nagios?
The reason I ask is because they contain credentials the access to them should be restricted as much as possible.
Regards
William
That resolved the issue.
And that makes perfect sense.
Thank you for that.
So these files should be accessible by user apache and nagios?
The reason I ask is because they contain credentials the access to them should be restricted as much as possible.
Regards
William
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: WMI AUTH with text file not working on windows WMI wizar
If it's only the single file in question, you can just change ownership to of the file to apache:nagios perms 640 . For multiple files create a directory and give the appropriate perms.
Previous Nagios employee