WMI_Authorization_File
Re: WMI_Authorization_File
Have you tried changing your password to something simple (no special characters)?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: WMI_Authorization_File
Yes i have made this password below, still the same error message. Please, help
WELcome12345678
WELcome12345678
Re: WMI_Authorization_File
Can you run the following commands from the command line, and show the output?
Code: Select all
/usr/local/nagios/libexec/check_wmi_plus.pl -H <ip address> -u 'test.account' -p 'WELcome12345678' -m checkcpu -w '80' -c '90'
/usr/local/nagios/libexec/check_wmi_plus.pl -H <ip address> -A /usr/local/nagios/etc/authorization.txt -m checkcpu -w '80' -c '90'
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: WMI_Authorization_File
Attachment.
You do not have the required permissions to view the files attached to this post.
Re: WMI_Authorization_File
Please, keep in mind, when I try it the normal way, putting in username & password. It works perfectly fine, so there is no issues with the permission from the server side neither the credentials issue. It just this file method of authentication not working.
Re: WMI_Authorization_File
I am not sure what you mean by "normal" way... It's totally normal to test your checks from the command line, and they should work... If they don't, this means that you are either using a wrong credentials or you don't have sufficient permissions.
Example of a working check from the command line (with username/password and an auth file):
Example of a working check from the command line (with username/password and an auth file):
Code: Select all
[root@main-nagios-xi libexec]# /usr/local/nagios/libexec/check_wmi_plus.pl -H x.x.x.x -u 'my username' -p 'my password' -m checkcpu -w '80' -c '90'
OK (Sample Period 13 sec) - Average CPU Utilisation 9.75%|'Avg CPU Utilisation'=9.75%;80;90;
[root@main-nagios-xi libexec]# /usr/local/nagios/libexec/check_wmi_plus.pl -H x.x.x.x -A /usr/local/nagios/etc/authorization.txt -m checkcpu -w '80' -c '90'
OK (Sample Period 3 sec) - Average CPU Utilisation 0.37%|'Avg CPU Utilisation'=0.37%;80;90;
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: WMI_Authorization_File
The credentials are correct, by normal way I meant is to use the Auth Info method instead of the file. The same exact credentials works fine when using the Auth Info method, but same exact credentials don't work when using the file method. Do you think the file created not correctly or format is not correct? I created file by simply right clicking in the directory and create a text file. Please help.
Re: WMI_Authorization_File
It is possible that the format (EOL) of the auth file is set to "dos", not "unix", which can cause issues. Open the auth file in "vi" text editor:
type:
and hit "Enter". You should see:
If you see "dos", then you would need to fix it by typing:
and hitting "Enter", then save and exit by typing:
and hitting "Enter".
You could also set line endings to "unix" via Notepad++ (if you have a GUI).
Edit > EOL Conversion > Unix (LF)
Note: Having said that, I would like to mention this again - if you check is NOT working when using " -u 'my username' -p 'my password' " this means it is NOT going to work with the auth file either... if you are using the same credentials that is. This check must work from the CLI:
It was not working for you. Please double check your credentials. If your user is on a domain, you may need to use:
Code: Select all
vi /usr/local/nagios/etc/authorization.txt
Code: Select all
:set ff?
Code: Select all
fileformat=unix
Code: Select all
:set ff=unix
Code: Select all
:wq
You could also set line endings to "unix" via Notepad++ (if you have a GUI).
Edit > EOL Conversion > Unix (LF)
Note: Having said that, I would like to mention this again - if you check is NOT working when using " -u 'my username' -p 'my password' " this means it is NOT going to work with the auth file either... if you are using the same credentials that is. This check must work from the CLI:
Code: Select all
/usr/local/nagios/libexec/check_wmi_plus.pl -H <ip address> -u 'test.account' -p 'WELcome12345678' -m checkcpu -w '80' -c '90'
Code: Select all
/usr/local/nagios/libexec/check_wmi_plus.pl -H <ip address> -u 'domain\test.account' -p 'WELcome12345678' -m checkcpu -w '80' -c '90'
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: WMI_Authorization_File
Please, see the attachment.
I followed the instruction, I saw the format was fileformat=unix. I'm thinking since the file was created manually by simply right click create a text file is it right method? also at the end I have extension as .txt is it correct as well? What permissions should be setup on the authorization file itself?
I followed the instruction, I saw the format was fileformat=unix. I'm thinking since the file was created manually by simply right click create a text file is it right method? also at the end I have extension as .txt is it correct as well? What permissions should be setup on the authorization file itself?
You do not have the required permissions to view the files attached to this post.
Re: WMI_Authorization_File
Here's the permissions of the auth file on my test Nagios XI server:
I don't think this is your issue though... In the screenshot you posted, you are not even using the auth file, and your check is still failing. Please, review the KB article below on WMI troubleshooting:
https://support.nagios.com/kb/article/n ... g-579.html
This is a good starting point for dealing with WMI issues.
Code: Select all
[root@main-nagios-xi libexec]# ll /usr/local/nagios/etc/authorization.txt
-rw-rw-r-- 1 apache nagios 37 Oct 28 16:12 /usr/local/nagios/etc/authorization.txt
https://support.nagios.com/kb/article/n ... g-579.html
This is a good starting point for dealing with WMI issues.
Be sure to check out our Knowledgebase for helpful articles and solutions!