Differences

This shows you the differences between two versions of the page.

Link to this comparison view

icinga-nagios:npcd_wrapper [2012/10/12 11:22] (current)
wadmin created
Line 1: Line 1:
 +====== NPCD Wrapper ======
  
 +Due to the instability of npcd (as soon as memory or cpu resources get tight npcd will just error out and exit) it is necessary to keep a close eye on it in case it decides to stop playing nicely and you start losing stats.
 +
 +I use a simple little bash script that checks if npcd is still running or not and just restarts it if missing. Works like a charm and I don't have to wait for icinga/​nagios to make the check and then sometime restart the service per action handler.
 +
 +<​file>​
 +#!/bin/bash
 +while true
 +do
 + sleep 5
 + if [ ! "​$(pidof npcd)" ]
 + then
 + service npcd restart
 + fi
 +done
 +</​file>​
/var/customers/webs/cw01/wiki/data/pages/icinga-nagios/npcd_wrapper.txt ยท Last modified: 2012/10/12 11:22 by wadmin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki