Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
install:configure-initd-script [2006/10/19 13:22] – created admin | install:configure-initd-script [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Make OpenSER init scipt working with monit ===== | ||
+ | |||
+ | Requires monit - a daemon monitoring tool | ||
+ | |||
+ | Info: http:// | ||
+ | |||
+ | cp <openser src>/ | ||
+ | chmod 755 / | ||
+ | wget http:// | ||
+ | tar -zxvf monit-4.8.2.tar.gz | ||
+ | cd monit-4.8.2 | ||
+ | ./configure | ||
+ | make | ||
+ | make install | ||
+ | vi / | ||
+ | |||
+ | This is about the most basic config you need to get monit with openser.init working. | ||
+ | < | ||
+ | ############################################################################### | ||
+ | ## Global section | ||
+ | ############################################################################### | ||
+ | ## | ||
+ | ## Start monit in background (run as daemon) and check the services at 2-minute | ||
+ | ## intervals. | ||
+ | # | ||
+ | set daemon | ||
+ | ## Set syslog logging with the ' | ||
+ | ## omited, monit will use ' | ||
+ | ## path to the file for monit native logging. | ||
+ | # | ||
+ | set logfile syslog facility log_daemon | ||
+ | # | ||
+ | ## Monit has an embedded webserver, which can be used to view the | ||
+ | ## configuration, | ||
+ | ## web interface. | ||
+ | # | ||
+ | set httpd port 2812 and use the address 127.0.0.1 | ||
+ | allow 127.0.0.1 | ||
+ | ############################################################################### | ||
+ | ## Services | ||
+ | ############################################################################### | ||
+ | # | ||
+ | check process openser with pidfile / | ||
+ | group openser | ||
+ | start program = "/ | ||
+ | | ||
+ | if 2 restarts within 3 cycles then timeout | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | Change permissions on monitrc | ||
+ | < | ||
+ | chmod 700 / | ||
+ | </ | ||
+ | |||
+ | Monit can run and be controlled from init. If monit should crash, init will re-spawn a new monit process. | ||
+ | To setup monit to run from init, you can use the 'set init' statement in monit' | ||
+ | |||
+ | < | ||
+ | vi / | ||
+ | </ | ||
+ | Add: | ||
+ | < | ||
+ | # Run monit in standard run-levels | ||
+ | mo: | ||
+ | </ | ||
+ | |||
+ | restart inittab | ||
+ | < | ||
+ | telinit q | ||
+ | </ | ||
+ | |||
+ | At this point anytime 120 sec if / | ||
+ | |||
+ | This is Just scratching the surface of what monit can do. | ||
+ | |||
+ | The info in this document may not be the best but at least seems like a start!!!! | ||
+ | |||
+ | ===== Installation Stuff ===== | ||
+ | |||
+ | {{indexmenu> | ||