SMART

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

SMART

Post by MPIvan »

Hi all

I have script in my pc that check the health on a hard disk. The script return OK or Not OK or critical .... so how to make this info of the script that is on some Windows PC to make Nagios uses as alert .... If i have OK status on Nagios to show OK ... etc .....
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: SMART

Post by abrist »

Have you set up an agent on the windows system? Most people around use nsclient++ for monitoring windows machines. . .
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: SMART

Post by MPIvan »

Yes i have ... for what i know for now this have to do with NRPE something or not ... Nagios send a signal to start the script and Windows machine return the result .... ( if im not wrong) any how if there is some way not to go with some kind of agent will be great, but if not i will go with NSClient it is a good agent ...
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: SMART

Post by abrist »

nsclient is the typical agent used for nrpe checks on a windows system.
MPIvan wrote:( if im not wrong) any how if there is some way not to go with some kind of agent will be great, but if not i will go with NSClient it is a good agent ...
You could use snmp or wmi monitoring.
http://assets.nagios.com/downloads/nagi ... ng_WMI.pdf
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: SMART

Post by MPIvan »

But im not using Nagios XI :S :( ....
This document describes how to monitor Windows machines with Nagios XI using WMI.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: SMART

Post by slansing »

The majority of the guide will still assist in enabling WMI queries on the windows server, then communicating with the Nagios server. Simply stop at the XI portion and transfer the steps there into a Core environment.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: SMART

Post by MPIvan »

Hi slansing,
i have follow the guide and i enable the WMI ... everything was fine but the guide on page 7 was not working for me ... any way im now on my pc im using Windows 7 and other things went well, but now i dont know how can monitoring my hard drive or my pc, how to configure Nagios ....

my point is to monitor hard drive health on windows machines and servers ... like i sad in the firs post i made simple script to tell the smart status of the drive but how can i implement with nagios.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: SMART

Post by slansing »

Well, if you are trying to execute a script on the windows server you can't do that with WMI as WMI is checking against the management instrumentation.. You will need to install NSClient++ and use NRPE to execute the plugin:

http://assets.nagios.com/downloads/nagi ... _Agent.pdf
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: SMART

Post by MPIvan »

... im trying to use this script

Here what iv got ....
root@nagios:~# ./check_nrpe -H 172.25.1.101 -t 30 -c check_raid -p 12489 -n
-bash: ./check_nrpe: No such file or directory
root@nagios:~#
and in nsclient.log file i have this
2013-07-15 14:38:29: e:..\..\..\..\trunk\modules\NSClientServer\NSClientServer.cpp:254: Invalid password (
2013-07-15 14:39:57: e:..\..\..\..\trunk\modules\NSClientServer\NSClientServer.cpp:254: Invalid password (
2013-07-15 14:41:28: e:..\..\..\..\trunk\modules\NSClientServer\NSClientServer.cpp:254: Invalid password (
2013-07-15 15:00:55: e:..\..\..\..\trunk\modules\NSClientServer\NSClientServer.cpp:254: Invalid password (None).
2013-07-15 15:06:22: e:..\..\..\..\trunk\modules\NSClientServer\NSClientServer.cpp:254: Invalid password (None).
2013-07-15 16:17:40: e:..\..\..\..\trunk\modules\NSClientServer\NSClientServer.cpp:254: Invalid password (
2013-07-15 16:18:48: e:..\..\..\..\trunk\modules\NSClientServer\NSClientServer.cpp:254: Invalid password (
2013-07-15 16:18:56: e:..\..\..\..\trunk\modules\NSClientServer\NSClientServer.cpp:254: Invalid password (
2013-07-15 16:19:11: e:..\..\..\..\trunk\modules\NSClientServer\NSClientServer.cpp:254: Invalid password (
this is already done script but if i can make this work i think i can make my too ... mi idea is, i have perl script that if you activate it runs cmd commands and return SMART status .. OK or Critical/Failed ... so i would like to integrate that script with Nagios to show me that status ...
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: SMART

Post by abrist »

Could you post a copy of your nsclient config from the windows server?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked