[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nagios-users
Subject:    Re: [Nagios-users] Remote commands
From:       "James Pratt" <jpratt () norwich ! edu>
Date:       2011-03-28 16:38:19
Message-ID: 369C2BA4DE2C8F4A88BC422AD06C96BD295D9E () nuexchange ! norwich ! edu
[Download RAW message or body]

--===============4987826070482701626==
Content-class: urn:content-classes:message
Content-Type: multipart/related;
	boundary="----_=_NextPart_001_01CBED66.8C28E925";
	type="multipart/alternative"

This is a multi-part message in MIME format.

[Attachment #2 (multipart/alternative)]


Hi, I think your only problem may that you have no "-H $HOSTADDRESS$" on
any of your defined commands - This means they will likely execute
locally, which is probably why you see the same output.

 

hope that helps

jamie

 

From: Paul Singh [mailto:Paul.Singh@bamford.co.uk] 
Sent: Monday, March 28, 2011 12:14 PM
To: nagios-users@lists.sourceforge.net
Subject: [Nagios-users] Remote commands

 

Setup: 

nagios core v 3.2.3

Nagios monitoring machine: my laptop running windows xpsp3

Remote servers to be monitored: windows server 2003

 

Directories: 

C:\Program Files\ICW\etc\nagios\nagios.cfg

C:\Program Files\ICW\etc\nagios\nagwin\commands.cfg

C:\Program Files\ICW\etc\nagios\nagwin\contacts.cfg

C:\Program Files\ICW\etc\nagios\nagwin\localhost.cfg

C:\Program Files\ICW\etc\nagios\nagwin\templates.cfg

C:\Program Files\ICW\etc\nagios\nagwin\timeperiods.cfg

C:\Program Files\ICW\etc\nagios\nagwin\hosts.cfg

 

 

 

Hello. Hope you are well. First time emailing so thought better to put
too much info than not enough!

 

I'm trying to define services and commands that will monitor my remote
servers. So at present, I have my localhost for which I have the
following local commands in localhost.cfg: 

 

# Define local commands

# 'check_local_disk' command definition
define command{
        command_name    check_local_disk
        command_line    $USER1$/check_pdm2 --disk --drive $ARG1$
--warning $ARG2$ --critical $ARG3$
        }

# 'check_local_procs' command definition
define command{
        command_name    check_local_procs
        command_line    $USER1$/check_winprocess --warning $ARG1$
--critical $ARG2$
        }

# 'check_local_load' command definition
define command{
        command_name    check_local_load
        command_line    $USER1$/check_pdm2 --processor --warning $ARG1$
--critical $ARG2$ --psamples $ARG3$ --pinterval $ARG4$
        }

# 'check_local_pyhsical_mem' command definition
define command{
 command_name check_local_physical_mem
 command_line $USER1$/check_pdm2 --memory physical --warning $ARG1$
--critical $ARG2$
 }

# 'check_local_virtual_mem' command definition
define command{
 command_name check_local_virtual_mem
 command_line $USER1$/check_pdm2 --memory virtual --warning $ARG1$
--critical $ARG2$
 }

# 'check_local_virtual_mem' command definition
define command{
 command_name check_local_pagefile_mem
 command_line $USER1$/check_pdm2 --memory pagefile --warning $ARG1$
--critical $ARG2$
 }
 # Define a service to check the disk space of system disk C on the
local machine.  
# Warning if < 20% free, critical if < 10% free space.
define service{
        use                             local-service         ; Name of
service template to use
        host_name                       localhost
        service_description             System disk
  check_command     check_local_disk!C:!95!99
        }
# Define a service to check the number of currently running procs on the
local machine.
# Warning if > 250 processes, critical if > 400 users.

define service{
        use                             local-service         ; Name of
service template to use
        host_name                       localhost
        service_description             Total Processes
 check_command   check_local_procs!250!400
        }

# Define a service to check the load on the local machine. 5 samples
with 5 secs intervals.
# Warning at 80%, Critical at 95%
define service{
        use                             local-service         ; Name of
service template to use
        host_name                       localhost
        service_description             Current Load
  check_command   check_local_load!85!95!5!5
        }

# Define a service to check the physical memory usage the local machine.

# Critical if less than 90% of swap is in use, warning if 80% is in use

define service{
        use                             local-service         ; Name of
service template to use
        host_name                       localhost
        service_description             Physical memory
  check_command   check_local_physical_mem!80!90
        }

# Define a service to check the virtual memory usage the local machine. 
# Critical if less than 90% of swap is in use, warning if 80% is in use

define service{
        use                             local-service         ; Name of
service template to use
        host_name                       localhost
        service_description             Virtual memory
  check_command   check_local_virtual_mem!80!90
        }

# Define a service to check the page file usage the local machine. 
# Critical if less than 90% of swap is in use, warning if 80% is in use

define service{
        use                             local-service         ; Name of
service template to use
        host_name                       localhost
        service_description             Page file
  check_command   check_local_pagefile_mem!80!90
        }

 

So all these work fine for the localhost. What I'm trying to do now is
setup the exact same capability but for the remote servers, and this is
where I'm getting stuck. Although I can define a service for the remote
servers, the output displayed is the same as I have for my localhost. So
for example in the screenshot below, the c: Disk space service, the
remote service I tried to setup, is actually using the local command
line and showing the same output as the System Disk service on
localhost. 

 

 

 

Can you please advise on how to setup up equivalent remote commands
similar to the local commands above?

Eventually, I am looking to set up equivalent remote services for
current load, page file, phys mem etc that I currently have for
localhost. 

 

So far I have: 

 

C:\Program Files\ICW\etc\nagios\nagwin\hosts.cfg

define service{
        use                             remote-service         ; Name of
service template to use
        host_name                    bamford-lon-fn1
        service_description             c: Disk Space
  check_command     check_remote_disk!C:!95!99
        } 

C:\Program Files\ICW\etc\nagios\nagwin\localhost.cfg

# 'check_remote_disk' command definition
define command{
        command_name    check_remote_disk
        command_line    $USER1$/check_pdm2 --disk --drive $ARG1$
--warning $ARG2$ --critical $ARG3$
        }

 

C:\Program Files\ICW\etc\nagios\nagwin\templates.cfg

# Remote service definition template- This is NOT a real service, just a
template!

 

define service{
  name       remote-service
  use                    generic-service
  max_check_attempts    4
  normal_check_interval   5
  retry_check_interval   1
  register      0
 }

 

 

I've seen something about this on the wiki at 
http://wiki.nagios.org/index.php/Howtos:checkbyssh_RedHat but those
commands are more centered around red hat and ssh. 

Also tried http://wiki.nagios.org/index.php/Howtos:specific but windows
os isn't listed (unless windows uses same commands as those listed?). 

 

If you could help in any way I'd be most grateful. 

If I've missed something out/you need more info please let me know. Thx,
Paul. 

 

 

 

 

 

Regards,

  

Paul Singh

IT Support | Bamford & Daylesford Organic |  DDI: +44 (0) 207 259 4938 |
Mobile: 07500 607 488

11a West Halkin Street, London SW1X 8JL

 

 

 

 

 

 

 

 

 

 

 

Bamford Ltd.
Registered Office: 11A West Halkin Street London, England. SW1X 8JL
Registered No. 4950734 England & Wales
 
The contents of this Email communication are confidential to the
addressee.
If you are not the intended recipient you may not disclose or distribute
this communication in any form but should immediately contact the
Sender.
The information, images, documents and views expressed in this Email are
personal to the Sender and do not expressly or implicitly represent
official 
positions and policies of the Bamford group of companies and no
authority exists on behalf of Bamford to make any agreements,
representations or other 
binding commitment by means of Email.
 
Certified 100% virus free by Postini
 
Please consider the environment before printing this email.
 

[Attachment #5 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" \
CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 \
(filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);} o\:* \
{behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
	{font-family:DIN-Regular;
	panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
pre
	{mso-style-priority:99;
	mso-style-link:"HTML Preformatted Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";}
span.HTMLPreformattedChar
	{mso-style-name:"HTML Preformatted Char";
	mso-style-priority:99;
	mso-style-link:"HTML Preformatted";
	font-family:Consolas;}
span.EmailStyle20
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in .75in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div \
class=WordSection1><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi, I think \
your only problem may that you have no &quot;-H $HOSTADDRESS$&quot; on any of your \
defined commands - This means they will likely execute locally, which is probably why \
you see the same output.<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>hope that \
helps<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>jamie<o:p></o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div \
style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p \
class=MsoNormal><b><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Paul Singh \
[mailto:Paul.Singh@bamford.co.uk] <br><b>Sent:</b> Monday, March 28, 2011 12:14 \
PM<br><b>To:</b> nagios-users@lists.sourceforge.net<br><b>Subject:</b> [Nagios-users] \
Remote commands<o:p></o:p></span></p></div></div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal><strong><span \
style='font-family:"DIN-Regular","serif"'>Setup: \
</span></strong><o:p></o:p></p></div><div><p class=MsoNormal><strong><span \
style='font-family:"DIN-Regular","serif"'>nagios core v \
3.2.3</span></strong><o:p></o:p></p></div><div><p class=MsoNormal><strong><span \
style='font-family:"DIN-Regular","serif"'>Nagios monitoring machine: my laptop \
running windows xpsp3</span></strong><o:p></o:p></p></div><div><p \
class=MsoNormal><strong><span style='font-family:"DIN-Regular","serif"'>Remote \
servers to be monitored: windows server \
2003</span></strong><o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal><strong><span \
style='font-family:"DIN-Regular","serif"'>Directories: \
</span></strong><o:p></o:p></p></div><div><p class=MsoNormal><strong><span \
style='font-family:"DIN-Regular","serif"'>C:\Program \
Files\ICW\etc\nagios\nagios.cfg</span></strong><o:p></o:p></p></div><div><p \
class=MsoNormal><strong><span style='font-family:"DIN-Regular","serif"'>C:\Program \
Files\ICW\etc\nagios\nagwin\commands.cfg</span></strong><o:p></o:p></p></div><div><p \
class=MsoNormal><strong><span style='font-family:"DIN-Regular","serif"'>C:\Program \
Files\ICW\etc\nagios\nagwin\contacts.cfg</span></strong><o:p></o:p></p></div><div><p \
class=MsoNormal><strong><span style='font-family:"DIN-Regular","serif"'>C:\Program \
Files\ICW\etc\nagios\nagwin\localhost.cfg</span></strong><o:p></o:p></p></div><div><p \
class=MsoNormal><strong><span style='font-family:"DIN-Regular","serif"'>C:\Program \
Files\ICW\etc\nagios\nagwin\templates.cfg</span></strong><o:p></o:p></p></div><div><p \
class=MsoNormal><strong><span style='font-family:"DIN-Regular","serif"'>C:\Program \
Files\ICW\etc\nagios\nagwin\timeperiods.cfg</span></strong><o:p></o:p></p></div><div><p \
class=MsoNormal><strong><span style='font-family:"DIN-Regular","serif"'>C:\Program \
Files\ICW\etc\nagios\nagwin\hosts.cfg</span></strong><o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif"'>Hello. Hope you are well. First time \
emailing so thought better to put too much info than not \
enough!</span><o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif"'>I'm trying to define services and commands \
that will monitor my remote servers. So at present, I have my localhost for which I \
have the following local commands in localhost.cfg: \
</span><o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif";color:green'># Define local \
commands</span><o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif";color:green'># 'check_local_disk' command \
definition<br>define command{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
command_name&nbsp;&nbsp;&nbsp; \
check_local_disk<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
command_line&nbsp;&nbsp;&nbsp; $USER1$/check_pdm2 --disk --drive $ARG1$ --warning \
$ARG2$ --critical $ARG3$<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
}</span><o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif";color:green'># 'check_local_procs' command \
definition<br>define command{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
command_name&nbsp;&nbsp;&nbsp; \
check_local_procs<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
command_line&nbsp;&nbsp;&nbsp; $USER1$/check_winprocess --warning $ARG1$ --critical \
$ARG2$<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
}</span><o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif";color:green'># 'check_local_load' command \
definition<br>define command{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
command_name&nbsp;&nbsp;&nbsp; \
check_local_load<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
command_line&nbsp;&nbsp;&nbsp; $USER1$/check_pdm2 --processor --warning $ARG1$ \
--critical $ARG2$ --psamples $ARG3$ --pinterval \
$ARG4$<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
}</span><o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif";color:green'># 'check_local_pyhsical_mem' \
command definition<br>define \
command{<br>&nbsp;command_name&nbsp;check_local_physical_mem<br>&nbsp;command_line&nbsp;$USER1$/check_pdm2 \
--memory physical --warning $ARG1$ --critical \
$ARG2$<br>&nbsp;}</span><o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif";color:green'># 'check_local_virtual_mem' \
command definition<br>define \
command{<br>&nbsp;command_name&nbsp;check_local_virtual_mem<br>&nbsp;command_line&nbsp;$USER1$/check_pdm2 \
--memory virtual --warning $ARG1$ --critical \
$ARG2$<br>&nbsp;}</span><o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif";color:green'># 'check_local_virtual_mem' \
command definition<br>define \
command{<br>&nbsp;command_name&nbsp;check_local_pagefile_mem<br>&nbsp;command_line&nbsp;$USER1$/check_pdm2 \
--memory pagefile --warning $ARG1$ --critical $ARG2$<br>&nbsp;}<br>&nbsp;# Define a \
service to check the disk space of system disk C on the local machine.&nbsp; <br># \
Warning if &lt; 20% free, critical if &lt; 10% free space.<br>define \
service{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
use&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp \
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
local-service&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Name of service \
template to use<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
host_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
localhost<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
service_description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
System disk<br>&nbsp;&nbsp;check_command&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;check_local_disk!C:!95!99<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
}<br># Define a service to check the number of currently running procs on the local \
machine.<br># Warning if &gt; 250 processes, critical if &gt; 400 \
users.</span><o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif";color:green'>define \
service{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
use&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp \
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
local-service&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Name of service \
template to use<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
host_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
localhost<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
service_description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Total Processes<br>&nbsp;check_command&nbsp;&nbsp;&nbsp;check_local_procs!250!400<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
}</span><o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif";color:green'># Define a service to check the \
load on the local machine. 5 samples with 5 secs intervals.<br># Warning at 80%, \
Critical at 95%<br>define service{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
use&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp \
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
local-service&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Name of service \
template to use<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
host_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
localhost<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
service_description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Current Load<br>&nbsp;&nbsp;check_command&nbsp;&nbsp;&nbsp;check_local_load!85!95!5!5<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
}</span><o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif";color:green'># Define a service to check the \
physical memory usage the local machine. <br># Critical if less than 90% of swap is \
in use, warning if 80% is in use</span><o:p></o:p></p></div><div><p \
class=MsoNormal><span style='font-family:"DIN-Regular","serif";color:green'>define \
service{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
use&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp \
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
local-service&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Name of service \
template to use<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
host_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
localhost<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
service_description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Physical memory<br>&nbsp;&nbsp;check_command&nbsp;&nbsp;&nbsp;check_local_physical_mem!80!90<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
}</span><o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif";color:green'># Define a service to check the \
virtual memory usage the local machine. <br># Critical if less than 90% of swap is in \
use, warning if 80% is in use</span><o:p></o:p></p></div><div><p \
class=MsoNormal><span style='font-family:"DIN-Regular","serif";color:green'>define \
service{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
use&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp \
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
local-service&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Name of service \
template to use<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
host_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
localhost<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
service_description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Virtual memory<br>&nbsp;&nbsp;check_command&nbsp;&nbsp;&nbsp;check_local_virtual_mem!80!90<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
}</span><o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif";color:green'># Define a service to check the \
page file usage the local machine. <br># Critical if less than 90% of swap is in use, \
warning if 80% is in use</span><o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif";color:green'>define \
service{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
use&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp \
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
local-service&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Name of service \
template to use<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
host_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
localhost<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
service_description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Page file<br>&nbsp;&nbsp;check_command&nbsp;&nbsp;&nbsp;check_local_pagefile_mem!80!90<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
}</span><o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif"'>So all these work fine for the localhost. \
What I'm trying to do now is setup the exact same capability but for the remote \
servers, and this is where I'm getting stuck. Although I can define a service for the \
remote servers, the output displayed is the same as I have for my localhost. So for \
example in the screenshot below, the c: Disk space service, the remote service I \
tried to setup,&nbsp;is actually using the local command line&nbsp;and showing the \
same output as the System Disk service on localhost. \
</span><o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal><img width=1280 \
height=747 id="_x0000_i1025" \
src="cid:image001.jpg@01CBED45.04C72F00"><o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif"'>Can you please advise on how to setup up \
equivalent remote commands similar to the local commands \
above?</span><o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif"'>Eventually, I am looking to set up \
equivalent remote services for current load, page file, phys mem etc that I currently \
have for localhost. </span><o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal><span \
style='font-family:"DIN-Regular","serif"'>So far I have: \
</span><o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><div><p class=MsoNormal><strong><span \
style='font-family:"DIN-Regular","serif"'>C:\Program \
Files\ICW\etc\nagios\nagwin\hosts.cfg</span></strong><o:p></o:p></p></div></div><div><p \
class=MsoNormal><span style='font-family:"DIN-Regular","serif"'>define \


["image001.jpg" (image/jpeg)]
["image002.jpg" (image/jpeg)]
[Attachment #8 (--===============4987826070482701626==)]
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and publish 
your website. http://p.sf.net/sfu/ms-webmatrix-sf


_______________________________________________
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic