[HOWTO= SIM - SYSTEM INTERGRITY MONITOR]
Two-a-t just reminded me i have not updated the server checklist for over a month now so i nthought id put up a HOWTO for SIM, its a simple script to install, basically just follow the readme. I will go through it in a bit more detail and make sure everyone can install it
## ok, So what is SIM?
SIM is a simple script, east to install and configure. Its probably the most useful script you will come across as a server administrator. It runs from CRON every 5 minutes (default time, can be changed) and checks for software such as apache, proftpd, DNS, SSH, MySQL, PGSQL, XINETD and SMTP to make sure they are running, if they are not, it will restart them automatically for you.
## How do i install it?
to inbstall it follow the simple guide below
## what if it goes wrong
Unfortunately, i cant guarantee it will work, it is for (i think) all versions of red hat and possibly others, i have installed it on ensim (red hat 7.3) and plesk (red hat 9) and had no problems. NOTE: I DO TAKE RESPONSIBILITY FOR ANY PROBLEMS THIS MAY CAUSE - it has not been tested by me with a DA server.
###### Installation ######
-- Information --
Commands are shown like this:
# command
Information is shown like this:
// information
Things you need to change are shown like this
*chnage_this_-_the_asterix_are_for_show_only_-_ remove_them_ when_you_edit_the_line*
##### Lets get started! #####
// make a temporary directory
# mkdir sim
// go into the directory you just made
# cd sim
// Download the latest copy of SIM
# wget http://www.rfxnetworks.com/downloads/sim-current.tar.gz
// Untar the file you just downloaded
# tar zxvf sim-current.tar.gz
// go into the untarred directory
# cd sim-2*
// Run the install file
// To uninstall replace the -i with -u
# ./setup -i
// Press enter a few times to read the license
// It should say SIM installation completed
// press enter if it hasnt already taken you to next section
// Sim should give a message like this:
SIM 2.5-3 must now be configured for use on this system, Press
return to run the autoconf script (/usr/local/sim/autoconf).
// Press enter to go through the configuration file, settings dont matter to much here.
// once thats finished and your back to command line do the following to get back to root
# cd
// now you need to edit the config file
# /usr/local/sim/conf.sim
// i recommend you read through all parts CAREFULLY, enable what you want monitored and check its all correct, most will be fine as default but its always best to make sure
// Chnage the following line to have your own email addresses
EMAIL="*root*" # address/user to send alerts to
// it should be chnaged to something like:
EMAIL="*[email protected]*" # address/user to send alerts to
// Next bit, select what you want monitored here (chnage the true and false parts)
SERV_FTP="true" # FTP Service
SERV_HTTP="true" # HTTP Service
SERV_DNS="true" # DNS Service
SERV_SSH="true" # SSH Service
SERV_MYSQL="true" # MySQL Service
SERV_PGSQL="false" # PGSQL Service
SERV_EWP="false" # Ensim Web Appliance Service
SERV_XINET="false" # XINET Sevice
SERV_SMTP="false" # SMTP Service
// Now make sure this is correct, it should be fine
FTP_NAME="proftpd" # name of FTP service as appears in 'ps'
HTTP_NAME="httpd" # name of HTTP service as appears in 'ps'
DNS_NAME="named" # name of DNS service as appears in 'ps'
SSH_NAME="sshd" # name of SSH service as appears in 'ps'
MYSQL_NAME="mysqld" # name of MySQL service as appears in 'ps'
PGSQL_NAME="postmaster" # name of PGSQL service as appears in 'ps'
EWP_NAME="ocwhttpd" # name of Ensim Web Appliance service as appears in 'ps'
XINET_NAME="xinetd" # name of XINET service as appears in 'ps'
SMTP_NAME="sendmail" # name of SMTP service as appears in 'ps'
// Unless you have chnaged ports leave the current ones as they are
// Finally all paths should be checked - again, should be fine as default but cant guarantee it
FTP_INIT="/etc/init.d/proftpd" # path to FTP service init script
HTTP_INIT="/etc/init.d/httpd" # path to HTTP service init script
DNS_INIT="/etc/init.d/named" # path to DNS service init script
SSH_INIT="/etc/init.d/sshd" # path to SSH service init script
MYSQL_INIT="/etc/init.d/mysqld" # path to MySQL service init script
PGSQL_INIT="/etc/init.d/postgresql" # path to PGSQL service init script
EWP_INIT="/etc/init.d/webppliance" # path to Ensim Web Appliance service init script
XINET_INIT="/etc/init.d/xinetd" # path to XINET service init script
SMTP_INIT="/etc/init.d/sendmail" # path to SMTP service init script
// You can leave the resr although i recommend you read through the rest and if you want to make modifications, make them (at your own risk of course)
// ok so you have it configured , now you have to get the script to run
# cd
# /usr/local/sim/sim -j
// if it says:
SIM 2.5-3 <[email protected]>
========================
Installed SIM cronjob.
// everything is now done!
// if it says:
SIM 2.5-3 <[email protected]>
========================
Removed SIM cronjob.
// type the following command again:
# /usr/local/sim/sim -j
// it should now show:
SIM 2.5-3 <[email protected]>
========================
Installed SIM cronjob.
// ok so its installed and configured, now to test it. Type the following command (note this will restart apache) THIS IS NOT REQUIRED
# service httpd stop
// you should notice that within 5 minutes apache has been restarted and is runninng like normal. If you didnt have sim and apache crashed, you would need to manually restart apache - see how useful this script is
// if you did the above test: type the following commands:
# cd
# /usr/local/sim/sim -s
// If it restarted it, you should see a line something similar to this
- Service Summary:
HTTP [restarted - 1 events]
MYSQL [online - 0 events]
.. other services.....
[/HOWTO]
Hope you all like it and enjoy it
Two-a-t just reminded me i have not updated the server checklist for over a month now so i nthought id put up a HOWTO for SIM, its a simple script to install, basically just follow the readme. I will go through it in a bit more detail and make sure everyone can install it
## ok, So what is SIM?
SIM is a simple script, east to install and configure. Its probably the most useful script you will come across as a server administrator. It runs from CRON every 5 minutes (default time, can be changed) and checks for software such as apache, proftpd, DNS, SSH, MySQL, PGSQL, XINETD and SMTP to make sure they are running, if they are not, it will restart them automatically for you.
## How do i install it?
to inbstall it follow the simple guide below
## what if it goes wrong
Unfortunately, i cant guarantee it will work, it is for (i think) all versions of red hat and possibly others, i have installed it on ensim (red hat 7.3) and plesk (red hat 9) and had no problems. NOTE: I DO TAKE RESPONSIBILITY FOR ANY PROBLEMS THIS MAY CAUSE - it has not been tested by me with a DA server.
###### Installation ######
-- Information --
Commands are shown like this:
# command
Information is shown like this:
// information
Things you need to change are shown like this
*chnage_this_-_the_asterix_are_for_show_only_-_ remove_them_ when_you_edit_the_line*
##### Lets get started! #####
// make a temporary directory
# mkdir sim
// go into the directory you just made
# cd sim
// Download the latest copy of SIM
# wget http://www.rfxnetworks.com/downloads/sim-current.tar.gz
// Untar the file you just downloaded
# tar zxvf sim-current.tar.gz
// go into the untarred directory
# cd sim-2*
// Run the install file
// To uninstall replace the -i with -u
# ./setup -i
// Press enter a few times to read the license
// It should say SIM installation completed
// press enter if it hasnt already taken you to next section
// Sim should give a message like this:
SIM 2.5-3 must now be configured for use on this system, Press
return to run the autoconf script (/usr/local/sim/autoconf).
// Press enter to go through the configuration file, settings dont matter to much here.
// once thats finished and your back to command line do the following to get back to root
# cd
// now you need to edit the config file
# /usr/local/sim/conf.sim
// i recommend you read through all parts CAREFULLY, enable what you want monitored and check its all correct, most will be fine as default but its always best to make sure
// Chnage the following line to have your own email addresses
EMAIL="*root*" # address/user to send alerts to
// it should be chnaged to something like:
EMAIL="*[email protected]*" # address/user to send alerts to
// Next bit, select what you want monitored here (chnage the true and false parts)
SERV_FTP="true" # FTP Service
SERV_HTTP="true" # HTTP Service
SERV_DNS="true" # DNS Service
SERV_SSH="true" # SSH Service
SERV_MYSQL="true" # MySQL Service
SERV_PGSQL="false" # PGSQL Service
SERV_EWP="false" # Ensim Web Appliance Service
SERV_XINET="false" # XINET Sevice
SERV_SMTP="false" # SMTP Service
// Now make sure this is correct, it should be fine
FTP_NAME="proftpd" # name of FTP service as appears in 'ps'
HTTP_NAME="httpd" # name of HTTP service as appears in 'ps'
DNS_NAME="named" # name of DNS service as appears in 'ps'
SSH_NAME="sshd" # name of SSH service as appears in 'ps'
MYSQL_NAME="mysqld" # name of MySQL service as appears in 'ps'
PGSQL_NAME="postmaster" # name of PGSQL service as appears in 'ps'
EWP_NAME="ocwhttpd" # name of Ensim Web Appliance service as appears in 'ps'
XINET_NAME="xinetd" # name of XINET service as appears in 'ps'
SMTP_NAME="sendmail" # name of SMTP service as appears in 'ps'
// Unless you have chnaged ports leave the current ones as they are
// Finally all paths should be checked - again, should be fine as default but cant guarantee it
FTP_INIT="/etc/init.d/proftpd" # path to FTP service init script
HTTP_INIT="/etc/init.d/httpd" # path to HTTP service init script
DNS_INIT="/etc/init.d/named" # path to DNS service init script
SSH_INIT="/etc/init.d/sshd" # path to SSH service init script
MYSQL_INIT="/etc/init.d/mysqld" # path to MySQL service init script
PGSQL_INIT="/etc/init.d/postgresql" # path to PGSQL service init script
EWP_INIT="/etc/init.d/webppliance" # path to Ensim Web Appliance service init script
XINET_INIT="/etc/init.d/xinetd" # path to XINET service init script
SMTP_INIT="/etc/init.d/sendmail" # path to SMTP service init script
// You can leave the resr although i recommend you read through the rest and if you want to make modifications, make them (at your own risk of course)
// ok so you have it configured , now you have to get the script to run
# cd
# /usr/local/sim/sim -j
// if it says:
SIM 2.5-3 <[email protected]>
========================
Installed SIM cronjob.
// everything is now done!
// if it says:
SIM 2.5-3 <[email protected]>
========================
Removed SIM cronjob.
// type the following command again:
# /usr/local/sim/sim -j
// it should now show:
SIM 2.5-3 <[email protected]>
========================
Installed SIM cronjob.
// ok so its installed and configured, now to test it. Type the following command (note this will restart apache) THIS IS NOT REQUIRED
# service httpd stop
// you should notice that within 5 minutes apache has been restarted and is runninng like normal. If you didnt have sim and apache crashed, you would need to manually restart apache - see how useful this script is
// if you did the above test: type the following commands:
# cd
# /usr/local/sim/sim -s
// If it restarted it, you should see a line something similar to this
- Service Summary:
HTTP [restarted - 1 events]
MYSQL [online - 0 events]
.. other services.....
[/HOWTO]
Hope you all like it and enjoy it
Last edited: