Thank you very much for that education. Opens all sorts of new doors. The add-on's that are installed out of the factory (if you can call them that) are all .exe files. If I understand you correctly, .pl (pearl) scripts will run directly. What about VB Script? I found a .vbs script for the check_file_age functionality and as I am much more familiar with this scripting language, It would be great if that would work as well. For now I'm finding no love. I've tried converting VBS to .EXE, .PL and the .VBS directly but nothing works. I now get "no output returned from plugin" error. I guess I've got a lot to learn.... I'll keep drilling...
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Natxo Asenjo Sent: Tuesday, June 22, 2010 12:26 AM To: Opsview Users Subject: Re: [opsview-users] (no subject) On Tue, Jun 22, 2010 at 2:35 AM, Greg Fishback <[email protected]> wrote: > Thank you Natxo, I believe I am using the client to run it locally but > sending the execution instructions from the OpsView machine (If I understand > that correctly). The file directory is local to the machine that has the > client installed but the problem is I can't seem to get the backslash to > translate. Forward slashes go through just fine but of course it can't find > that path, any backslashes I include (double backslashes as well) are simply > pulled out of the string concatenating everything together. I've located > several documents similar to the one you directed me to but they all > reference another linux box and the forward slash. I may be completely > misunderstanding how this all works and will attempt to tear into the > document you sent me at length to see if it sparks anything. aha, now I understand what the problem is. You are trying to execute the file /usr/local/nagios/libexec/check_file_age on the opsview server to get the results from a remote windows server. That is not going to work. What will work is to run the check_file_age script locally on the windows server from nrpe. So the opsview/nagios server calls the check that gets executed on the remote server and the results are passed on to the nagios server. Thankfully for you, the check_file_age plugin is a perl script, so you can copy it from the opsview server and run it on the windows server without any changes. The only thing you need is to install the perl interpreter on the windows server and configure the nrpe server on it. The nrpe server on the windows server is usually installed when you install the nsclientpp (or nsclient++) package. See http://docs.opsview.com/doku.php?id=opsview-community:agents Once it is installed, you need to configure it, that is just a matter of editing the nsc.ini and reloading the nsclientpp service. This is our nsc.ini: =================begin nsc.ini===================================================================== ========= [modules] FileLogger.dll CheckSystem.dll CheckDisk.dll NSClientListener.dll NRPEListener.dll ;SysTray.dll CheckEventLog.dll CheckHelpers.dll CheckWMI.dll [Settings] ; This is the password (-s) that is required to access NSClient remotely. If you leave this blank everyone will be able to access the daemon remotly. password=xxxx ; This is a comma-delimited list of IP address of hosts that are allowed to talk to the all daemons. ; If leave this blank anyone can access the deamon remotly (NSClient still requires a valid password). ; The syntax is host or ip/mask so 192.168.0.0/24 will allow anyone on that subnet access allowed_hosts=ip addresses here ; ;# USE THIS FILE ; Use the INI file as opposed to the registry if this is 0 and the use_reg in the registry is set to 1 ; the registry will be used instead. use_file=1 [log] ;# LOG DEBUG ; Set to 1 if you want debug message printed in the log file (debug messages are always printed to stdout when run with -test) ;debug=1 ; ;# LOG FILE ; The file to print log statements to ;file=NSC.log ; ;# LOG DATE MASK ; The format to for the date/time part of the log entry written to file. ;date_mask=%Y-%m-%d %H:%M:%S [NSClient] port=12489 [NRPE] port=5666 command_timeout=60 allow_arguments=1 socket_timeout=30 [NRPE Handlers] nrpe_CheckService=inject checkServiceState CheckAll exclude=SysmonLog nrpe_CheckDriveSize=inject CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED FilterType=REMOTE nrpe_checkpage=inject CheckMem MaxWarn=80% MaxCrit=90% ShowAll type=page nrpe_checkphys=inject CheckMem MaxWarn=80% MaxCrit=90% ShowAll type=physical nrpe_check_array_health=scripts\sas_disks_health.bat nrpe_check_desktopshortcuts=d:\perl\bin\perl.exe scripts\check_citrixshortcuts.pl nrpe_check_ad=scripts\check_ad.exe --dc --noeventlog nrpe_check_lcmr_in_dir=d:\perl\bin\perl.exe scripts\check_lcmr_dir.pl --dir IN nrpe_check_lcmr_uit_dir=d:\perl\bin\perl.exe scripts\check_lcmr_dir.pl --dir UIT nrpe_check_schtasks=d:\perl\bin\perl.exe scripts\check_schtasks.pl =========================end nsc.ini===================================================================== so you can write your own checks and have them executed and read from the nagios server. The 'inject' checks are native to nsclientpp, the rest are our checks. You can use whatever language you want provided the interpreter is installed and the results that nagios server recieves are understood by it. Once the nrpe server is installed and you have verified that the check works locally from a windows cli, then you can check it from the nagios server using the check_nrpe plugin. So to check the windows services, you run ./check_nrpe -H hostname -c nrpe_CheckService and you should get OK, WARNING, CRITICAL or UNKNOWN. -- natxo _______________________________________________ Opsview-users mailing list [email protected] http://lists.opsview.org/lists/listinfo/opsview-users _______________________________________________ Opsview-users mailing list [email protected] http://lists.opsview.org/lists/listinfo/opsview-users
