[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
would like a broadcast message when pid changes..
From: |
Tom H |
Subject: |
would like a broadcast message when pid changes.. |
Date: |
Thu, 22 Mar 2012 18:52:58 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 |
Hi,
I am using monit on CentOs 6.2 instances, but I cannot get it to
broadcast a message when a service is restarted.
Any suggestions on what am I doing wrong here...
address@hidden ~]# cat /etc/monit.d/munin-node.conf
check process munin-node with pidfile /var/run/munin/munin-node.pid
start program = "/etc/init.d/munin-node start"
stop program = "/etc/init.d/munin-node stop"
if changed pid then exec "/bin/echo logger | /usr/bin/wall"
address@hidden ~]# cat /etc/monit.conf
set daemon 20 # check services at 2-minute intervals
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
include /etc/monit.d/*
address@hidden ~]# ps -ef | grep munin; service munin-node restart;
ps -ef | grep munin-node
root 22461 1 0 11:14 ? 00:00:00 /usr/sbin/munin-node
root 22838 11673 0 11:14 pts/0 00:00:00 grep munin
Stopping Munin Node agents: [ OK ]
Starting Munin Node: [ OK ]
root 22866 1 2 11:14 ? 00:00:00 /usr/sbin/munin-node
root 23205 11673 0 11:14 pts/0 00:00:00 grep munin-node
address@hidden ~]# monit status
The Monit daemon 5.1.1 uptime: 6m
Process 'munin-node'
status running
monitoring status monitored
pid 24677
parent pid 1
uptime 6m
children 0
memory kilobytes 8424
memory kilobytes total 8424
memory percent 0.1%
memory percent total 0.1%
cpu percent 0.0%
cpu percent total 0.0%
data collected Thu Mar 22 11:24:59 2012
System 'server-64634.novalocal'
status running
monitoring status monitored
load average [0.08] [0.04] [0.00]
cpu 0.0%us 0.0%sy 0.0%wa
memory usage 193024 kB [2.3%]
data collected Thu Mar 22 11:24:59 2012
address@hidden ~]# monit summary
The Monit daemon 5.1.1 uptime: 6m
Process 'munin-node' running
System 'server-64634.novalocal' running
address@hidden ~]#
- would like a broadcast message when pid changes..,
Tom H <=