On 3/14/07, <b class="gmail_sendername">Nilesh Shastrakar</b> <<a href="mailto:nilesh@extenprise.com">nilesh@extenprise.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Dear All,</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">I have written a scripts which we will give the
output like top command </font></div>
<div><font face="Arial" size="2">but on nagios screen it shows me only one line
status information also in mail notification.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">I want to print all output of this file on mail as
well as on Nagios status Information screen</font></div>
<div><font face="Arial" size="2">The current status shows me like this.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div>
<table border="0">
<tbody>
<tr>
<td>Current Status:</td>
<td>
<div> OK </div></td></tr>
<tr>
<td>Status Information:</td>
<td>%Mem %CPU Command User PID
Time</td></tr></tbody></table></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">I want in fromat </font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Current Status OK </font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Status Information:</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">%Mem
%CPU
Command
User
PID Time<br>7.1
0.3 MailScanner
root
20492 00:00:01</font></div>
<div> </div>
<div><font face="Arial" size="2">7.1
0.3 MailScanner
root
19144 00:00:01</font></div>
<div> </div>
<div><font face="Arial" size="2">7.1
0.2 MailScanner
root
19652 00:00:01</font></div>
<div> </div>
<div><font face="Arial" size="2">7.1
0.2 MailScanner
root
19388 00:00:01</font></div>
<div> </div>
<div><font face="Arial" size="2">7.0
0.2 MailScanner
root
19617 00:00:01</font></div>
<div> </div>
<div><font face="Arial" size="2">4.3
0.0
clamd
clamav
3919 00:00:03</font></div>
<div> </div>
<div><font face="Arial" size="2">3.9
0.0 rhn-applet-gui
root
5587 00:00:03</font></div>
<div> </div>
<div><font face="Arial" size="2">3.6
0.5
X
root
4921 00:00:29</font></div>
<div> </div>
<div><font face="Arial" size="2">3.5
0.0
mysqld
mysql
5725 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">3.5
0.0 MailScanner
root
19143 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">3.0
0.0
nautilus
root
5563 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">2.5
0.6 gnome-terminal
root
10650 00:00:07</font></div>
<div> </div>
<div><font face="Arial" size="2">2.3
0.0 gnome-panel
root
5558 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">2.1
6.9 gnome-system-mo
root
23128 00:00:19</font></div>
<div> </div>
<div><font face="Arial" size="2">2.1
0.0 gnome-session
root
5225 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">2.0
0.0 wnck-applet
root
5782 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">1.8
0.0 mixer_applet2
root
5840 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">1.5
0.0 clock-applet
root
5843 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">1.4
0.0
gconfd-2
root
5292 00:00:01</font></div>
<div> </div>
<div><font face="Arial" size="2">1.4
0.0
eggcups
root
5583 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">1.3
0.0 notification-ar
root
5845 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">1.3
0.0
metacity
root
5390 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">1.3
0.0 gnome-settings-
root
5362 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">1.2
0.0 gnome-volume-ma
root
5570 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">0.8
0.0 pam-panel-icon
root
5585 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">0.8
0.0
hald
root
4222 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">0.6
0.0 gnome-vfs-daemo
root
5735 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">0.5
0.0
httpd
apache
5604 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">0.5
0.0
httpd
apache
5603 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">0.5
0.0
httpd
apache
5602 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">0.5
0.0
httpd
apache
5601 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">0.5
0.0
httpd
apache
5600 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">0.5
0.0
httpd
apache
5599 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">0.5
0.0
httpd
apache
5598 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">0.5
0.0
httpd
apache
5597 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">0.5
0.0 gdm-binary
root
4900 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">0.5
0.0 bonobo-activati
root
5327 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">0.4
0.0
sshd
root
14828 00:00:00</font></div>
<div> </div>
<div><font face="Arial" size="2">If I run the command on shell the above output will
show me</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">[root@centos4 ~]# ksh
check_top_process.sh.old<br></font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Could someone help me or is there other plugin
which will give the all process list with details</font></div>
<div><font face="Arial" size="2">also I have attached the script for
reference.</font></div>
<div><font face="Arial" size="2">Thanks </font></div>
<div><font face="Arial" size="2">Nilesh</font></div></div>
</blockquote></div><br>Nagios plugins by default only allow 1 line of output. You can delimit
this line with the | (pipe) character to include more performance data,
but it certainly won't get you anywhere near what you want.<br>
<br>
Nagios 3 does have extended output capabilities for plugins allowing
you to return more details from the plugin check. See
<a href="http://nagios.cvs.sourceforge.net/*checkout*/nagios/nagios/html/docs/pluginapi.html">http://nagios.cvs.sourceforge.net/*checkout*/nagios/nagios/html/docs/pluginapi.html</a>
for more details.<br>
<br>
Rob<br><br>