/[monit]/monit/web/doc/examples.php
ViewVC logotype

Diff of /monit/web/doc/examples.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by martinp, Fri Apr 15 14:53:23 2005 UTC revision 1.10 by martinp, Fri May 6 09:48:22 2005 UTC
# Line 118  it is general enough to be of interest f Line 118  it is general enough to be of interest f
118       <ul>       <ul>
119          <LI><A HREF="#coresol">Watch and analyze crashdumps (Solaris)</A></LI>          <LI><A HREF="#coresol">Watch and analyze crashdumps (Solaris)</A></LI>
120          <LI><A HREF="#corelin">Watch and analyze crashdumps (Linux)</A></LI>          <LI><A HREF="#corelin">Watch and analyze crashdumps (Linux)</A></LI>
121            <LI><A HREF="#tcpdump">Start and stop tcpdump based on condition</A></LI>
122       </ul>       </ul>
123    </li>    </li>
124  </ul>  </ul>
# Line 1086  Monit set to watch the directory timesta Line 1087  Monit set to watch the directory timesta
1087  </pre>  </pre>
1088    
1089    
1090    <h3><a name="tcpdump">Start and stop tcpdump based on network outage</a></h3>
1091    As soon as the remote SMTP service of host bar is not available tcpdump is started.
1092    When the connection is available again, tcpdump is stopped. Monit is running as
1093    non-privileged user so sudo was used to provide tcpdump capability. Only first
1094    ocurrence is catched (noexec flag is created to prevent another outage monitoring).
1095    <pre>
1096     check host bar with address 10.1.1.2
1097       if failed port 25 protocol smtp then exec "/bin/bash -c 'if [ ! -f /tmp/noexec ]; then touch /tmp/noexec; sudo tcpdump -w /tmp/foo_bar.dump host bar; fi'" else if recovered then exec "sudo killall tcpdump"
1098    </pre>
1099    
1100    
1101  <?php include '../include/footer.html'; ?>  <?php include '../include/footer.html'; ?>

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26