1819794 Members
3457 Online
109607 Solutions
New Discussion юеВ

linux servecies

 
Fadia Almarei
Super Advisor

linux servecies

Dear All
i have a radius service run on my redhat9 linux server i want something to check if the service is run if it is not running start it a gain,i want a script or other thing found in linux if there is.
BR,
fadia.marei
7 REPLIES 7
NiCK_76
Respected Contributor

Re: linux servecies

Hi,Fadia Almarei

The Service Monitoring Daemon (http://www.kernel.org/software/mon/) will
satisfy your requirements. It can monitor service status , and issue alert or perform script when service down or any status you have been defined.


NiCK
just for fun
Fadia Almarei
Super Advisor

Re: linux servecies

Hi Nick
thanks for reply but the link does not open ,an i want to ask how does this tool can notify me about the services if it is down.
fadia.marei
NiCK_76
Respected Contributor

Re: linux servecies

Hi Fadia Almarei ,

easy configure Service Monitoring Daemon
For example:
Monitor apache service


edit file mon.cf

cfbasedir = /etc/mon
alertdir = /usr/lib/mon/alert.d
mondir = /usr/lib/mon/mon.d
statedir = /usr/lib/mon/state.d
logdir = /usr/lib/mon/log.d
dtlogfile = /usr/lib/mon/log.d/dt.log
maxprocs = 20
histlength = 100
randstart = 60s
dtlogging = yes
authtype = getpwnam

hostgroup servers 10.1.1.1 10.1.1.2
hostgroup www 10.1.1.1

watch www
service http
interval 1m
monitor http.monitor
period wd {Sun-Sat}
alert apacherestart.alert
alert mail.alert song@heming.org

edit file apacherestart.alert
#!/bin/sh
/etc/init.d/apache2 restart


Perform script apacherestart.alert and send mail to song@heming.org ,If http service down .
just for fun
Fadia Almarei
Super Advisor

Re: linux servecies

i do not have a file called mon.cf in my system ,and the link you give me does not open ,so what
fadia.marei
Fadia Almarei
Super Advisor

Re: linux servecies

and i do not undestand most of the things you write on the script, i want the script for a radius service,so what to do for that
fadia.marei
xyko_1
Esteemed Contributor

Re: linux servecies

Fadia,

Mon is a very good choice to solve your problem.

There's a script monitor for radius ( http://ftp.kernel.org/pub/software/admin/mon/contrib/monitors/radius/ ) that you can use with little efort.

Mon's site is http://www.kernel.org/software/mon/

regards,
xyko
NiCK_76
Respected Contributor

Re: linux servecies

Hi Fadia Almarei ,

Please open following URL
http://www.kernel.org/software/mon/

The file mon.cf will be created after mon package install.

NiCK
just for fun