LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-25-2003, 05:39 AM   #1
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
INFO: configuring monit (process monitoring)


As a side note: this is just a thread part of my main thread which is destinated at securing debian!

BTW, monit should be run through init:
Code:
----------------------------------------------------------------------
installed monit (self-created package)
----------------------------------------------------------------------
	prior installation:
		apt-get install stat


	packages are contained in packages directory. no warranty
	of any kind that this package is bug-free ...

		dpkg -i packages/monit/*.deb


	removed monit from system startup:
		update-rc.d -f monit remove


	added monit to /etc/inittab:

		# Run monit in standard runlevels
		mo:2345:respawn:/usr/sbin/monit \
			-Ic /etc/monit/monitrc &> /dev/null


	telinit q
----------------------------------------------------------------------




----------------------------------------------------------------------
created monit configuration			[ /etc/monit/monitrc ]
----------------------------------------------------------------------

# --------------------------------------------------------------------
# base configuration
# --------------------------------------------------------------------
set daemon	60
set logfile	syslog
set mailserver	localhost
set mail-format
	{
		from:		monit@debian.example.com
	}
set httpd	port 2812 and
		use address debian.example.com
		allow 192.168.0.84
		allow admin:swordfish
# --------------------------------------------------------------------




# --------------------------------------------------------------------
# system services
# --------------------------------------------------------------------
check cron
	pidfile		/var/run/crond.pid
	group		system_services
	start		program = "/etc/init.d/cron start"
	stop		program = "/etc/init.d/cron stop"
	timeout		(5, 5)
	alert		linux-admins@example.com


check klogd
	pidfile		/var/run/klogd.pid
	group		system_services
	start		program = "/etc/init.d/klogd start"
	stop		program = "/etc/init.d/klogd stop"
	timeout		(5, 5)
	alert		linux-admins@example.com


check sysklogd
	pidfile		/var/run/syslogd.pid
	group		system_services
	start		program = "/etc/init.d/sysklogd start"
	stop		program = "/etc/init.d/sysklogd stop"
	timeout		(5, 5)
	timestamp 	"/var/log/info.log" > 65 minutes
		then	alert
	alert		linux-admins@example.com


check uptimed
	pidfile		/var/run/uptimed
	group		system_services
	start		program = "/etc/init.d/uptimed start"
	stop		program = "/etc/init.d/uptimed stop"
	timeout		(5, 5)
	every		30
	alert		linux-admins@example.com
# --------------------------------------------------------------------




# --------------------------------------------------------------------
# public services
# --------------------------------------------------------------------
check postfix
	pidfile		/var/spool/postfix/pid/master.pid
	group		mail
	start		program = "/etc/init.d/postfix start"
	stop		program = "/etc/init.d/postfix stop"
	host		127.0.0.1
	port		25
	type		tcp
	protocol	smtp
	timeout		(3, 5)
	every		5
	alert		linux-admins@example.com


check ssh_private
	pidfile		/var/run/sshd_hp.pid
	group		administration
	start		program = "/etc/init.d/ssh_hp start"
	stop		program = "/etc/init.d/ssh_hp stop"
	host		debian.example.com
	port		49150
	type		tcp
	protocol	ssh
	timeout		(3, 5)
	every		30
	alert		linux-admins@example.com


check ssh_public
	pidfile		/var/run/sshd.pid
	group		administration
	start		program = "/etc/init.d/ssh start"
	stop		program = "/etc/init.d/ssh stop"
	host		debian.example.com
	port		22
	type		tcp
	protocol	ssh
	timeout		(3, 5)
	every		15
	alert		linux-admins@example.com
# --------------------------------------------------------------------

----------------------------------------------------------------------
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Monitoring bandwdth use by process psychen6 Linux - Networking 1 11-22-2005 08:24 PM
Process monitoring tools IanChristie Linux - Networking 4 11-01-2004 02:28 PM
Process Monitoring arb Linux - Newbie 1 09-15-2003 08:35 AM
Process monitoring arb Linux - General 3 09-15-2003 03:29 AM
monitoring daemons, filesystems and more (Monit v4.0B) markus1982 Linux - Software 2 09-14-2003 08:38 AM


All times are GMT -5. The time now is 06:21 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration