<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body>
If it is a perl script here is a recipe:<br>
<br>
At the top of the script do:<br>
<br>
use libs qw(/usr/nagios/libexec); # or wherever your nagios is installed<br>
use utils;<br>
<br>
At the place where your script returns result, do something like<br>
<br>
if (test() eq FAILED) { print "The failure message"; exit
$ERRORS{CRITICAL'} }<br>
else { print "The OK message"; exit $ERRORS{'OK'}; }<br>
<br>
Do not forget that only 1 line of output will be captured by nagios and
that there is a hard-coded limit of 3 hundred something bytes<br>
for that line. Whatever your plugin does, it should always exit with
appropriate status, it should never freeze (pay attention to timeouts)<br>
and it should generate some output.<br>
<br>
For more info see Nagios Plugins web site.<br>
<br>
<br>
Ajay Mohanty wrote:<br>
<blockquote type="cite" cite="mid008301c39925$5fc48460$020010ac@ashok">
  <meta name="GENERATOR" content="MSHTML 5.00.2920.0">
  <style></style>
  <div><font size="2" face="Arial">Hi ,</font></div>
  <div> </div>
  <div><font size="2" face="Arial">I  use a small script in servers (
linux servers) to view status of a particular service .</font></div>
  <div><font size="2" face="Arial">I want the same as a plugin .</font></div>
  <div><font size="2" face="Arial">If anyone can help.</font></div>
  <div> </div>
  <div><font size="2" face="Arial">Ajay</font></div>
  <div> </div>
</blockquote>
<br>
</body>
</html>