SMART
Re: SMART
I assume you have a script named "smarpfa.vbs" in the NSClient++ script's folder. Modify the nsclient.ini file by doing the following:
Under the [/settings/external scripts/wrapped scripts] section (VISUAL BASIC WRAPPING), change this line:
to this:
Under the [/settings/external scripts/scripts] section, add the following line:
Restart the nsclient++ service, so that the changes can take effect.
From the nagios server, run from the command line:
Hope this helps.
Under the [/settings/external scripts/wrapped scripts] section (VISUAL BASIC WRAPPING), change this line:
Code: Select all
vbs = cscript.exe //T:60 //NoLogo scripts\\lib\\wrapper.vbs smartpfa.vbsCode: Select all
vbs = cscript.exe //T:60 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%Code: Select all
check_raid=cscript.exe //T:60 //NoLogo scripts\smartpfa.vbs $ARG1$From the nagios server, run from the command line:
Code: Select all
./check_nrpe -H 172.25.1.101 -c check_raid -a <place your arguments here, wrapped in single quotes>Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: SMART
Hi ... now we have some progress but i get some error ... also i don't know what arguments to put ....
root@nagios:/usr/local/nagios/libexec# ./check_nrpe -H 172.25.1.101 -c check_raid
scripts/check_smartarray.ps1 : AuthorizationManager check failed.
At line:1 char:1
+ scripts/check_smartarray.ps1; exit $LastExitCode
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Re: SMART
Hi,
here is what iv got when i execute the check_smartarray.ps1 from powershell run as administrator, first i execute like check_smartarray.ps1 and have errors then i execute with .\check_smartarray.ps1 and i have something ...
and when i run the smartpfa.vbs it pops out one box and it says OK: No pfa/S.M.A.R.T errors detected
here is what iv got when i execute the check_smartarray.ps1 from powershell run as administrator, first i execute like check_smartarray.ps1 and have errors then i execute with .\check_smartarray.ps1 and i have something ...
PS C:\Program Files\NSClient++\scripts> check_smartarray.ps1
check_smartarray.ps1 : The term 'check_smartarray.ps1' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:1
+ check_smartarray.ps1
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (check_smartarray.ps1:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Suggestion [3,General]: The command check_smartarray.ps1 was not found, but does exist in the current location. Windows
PowerShell does not load commands from the current location by default. If you trust this command, instead type ".\check
_smartarray.ps1". See "get-help about_Command_Precedence" for more details.
PS C:\Program Files\NSClient++\scripts> .\check_smartarray.ps1
Security warning
Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your
computer. Do you want to run C:\Program Files\NSClient++\scripts\check_smartarray.ps1?
[D] Do not run [R] Run once Suspend [?] Help (default is "D"): R
& : The term 'C:\Program Files (x86)\Compaq\Hpacucli\Bin\hpacucli.exe' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At C:\Program Files\NSClient++\scripts\check_smartarray.ps1:163 char:11
+ $exec = & $prg 'ctrl all show config'
+ ~~~~
+ CategoryInfo : ObjectNotFound: (C:\Program File...in\hpacucli.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
OK - RAID status is good
PS C:\Program Files\NSClient++\scripts>
and when i run the smartpfa.vbs it pops out one box and it says OK: No pfa/S.M.A.R.T errors detected
PS C:\Program Files\NSClient++\scripts> .\smartpfa.vbs
PS C:\Program Files\NSClient++\scripts>
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: SMART
It would seem you did not define your check_raid as lmiltchev defined, this should no longer be executing the powershell script, but the smartpfa.vbs. Please follow his steps above and test again.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: SMART
Hmm, i didnt do anything except i restart the NSClient++. I didnt change nothing ( it was exactly like lmiltchev sasy to be ) in nsclient.ini file. And when i execute the command i have the following:
I dont know what arguments to put . I just execute this line. "./check_nrpe -H 172.25.1.101 -c check_raid "root@nagios:/usr/local/nagios/libexec# ./check_nrpe -H 172.25.1.101 -c check_raid
OK : No PFA/S.M.A.R.T errors detected
root@nagios:/usr/local/nagios/libexec#
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: SMART
Actually, that looks perfect! The results are what I would expect to see. Are you looking for something different?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: SMART
Hi sreinhardt,
sorry for late reply, I have other high priority problems and tnx for helping me. Any way, i dont know way i chose this plug in. Because in the description of this plugin says that it is for "Powershell script to check HP SmartArray RAID status on Windows". So what does "HP SmartArray means" ? But any way we are using Dell PC everywhere (with windows on it), is this plugin give me true result or not? And i would like to suggest some plugin that will gave me the health of the disk or SMART status. Im a lost a little bit for everything here and i will need a little help for this job.
sorry for late reply, I have other high priority problems and tnx for helping me. Any way, i dont know way i chose this plug in. Because in the description of this plugin says that it is for "Powershell script to check HP SmartArray RAID status on Windows". So what does "HP SmartArray means" ? But any way we are using Dell PC everywhere (with windows on it), is this plugin give me true result or not? And i would like to suggest some plugin that will gave me the health of the disk or SMART status. Im a lost a little bit for everything here and i will need a little help for this job.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: SMART
You need be sure to read what the plugin actually does before spending 3 pages trying to implement something that will not work in the first place... HP Smart Arrays WILL NOT work with your dell systems. Please verify the plugins you are trying to use before downloading them and asking for help. Once you find a plugin which will function with your specific hardware and systems then we can help you to implement it.
Last edited by sreinhardt on Tue Sep 03, 2013 11:06 am, edited 1 time in total.
Reason: locked thread, please open a new one when a plugin is found that will work with your hardware, and the metrics you are looking for are well definied.
Reason: locked thread, please open a new one when a plugin is found that will work with your hardware, and the metrics you are looking for are well definied.