Page 1 of 2 12 LastLast
Results 1 to 20 of 21

Thread: HOWTO: SIM - system intergrity monitor

  1. #1
    Join Date
    Jun 2003
    Location
    UK
    Posts
    2,326

    HOWTO: SIM - system intergrity monitor

    [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="*username@yourdomain.com*" # 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 <sim@r-fx.org>
    ========================
    Installed SIM cronjob.

    // everything is now done!

    // if it says:

    SIM 2.5-3 <sim@r-fx.org>
    ========================
    Removed SIM cronjob.

    // type the following command again:

    # /usr/local/sim/sim -j

    // it should now show:

    SIM 2.5-3 <sim@r-fx.org>
    ========================
    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 by ProWebUK; 08-06-2003 at 04:29 PM.
    OptimumServers » Managed Dedicated Servers & General Systems Management » Coming Soon!
    ProWebUK - Quality Web Services
    DirectAdmin Server Checklist

  2. #2
    Join Date
    May 2003
    Location
    /home/admin
    Posts
    298
    Hi,

    DirectAdmin automatically restarts downed services every minute, making SIM useful for services other than those monitored by DA. DA will always restart the service before SIM is able to, so your best bet is to keep SIM off for anything that is installed/supported by DA.

    Additionally, DA does not use sendmail, it uses Exim, so those lines relating to sendmail will need to be changed. I don't think the sendmail init script is symlinked to exim, and exim does not run as "sendmail" on DA systems.

    Regardless, thanks for the howto !
    Last edited by loopforever; 08-06-2003 at 04:10 PM.
    Matt Savona
    serveIO
    Creator of the DirectAdmin Enhanced Theme

  3. #3
    Join Date
    Jun 2003
    Location
    UK
    Posts
    2,326
    just turned smtp monitoring off , what does DA monitor and restart?? (helps out if anything like this comes up in the future :P )
    OptimumServers » Managed Dedicated Servers & General Systems Management » Coming Soon!
    ProWebUK - Quality Web Services
    DirectAdmin Server Checklist

  4. #4
    Join Date
    May 2003
    Location
    /home/admin
    Posts
    298
    It monitors:

    Apache
    DirectAdmin
    Exim
    MySQL
    Named
    ProFTP
    sshd
    vm-pop3d
    Matt Savona
    serveIO
    Creator of the DirectAdmin Enhanced Theme

  5. #5
    Join Date
    Oct 2003
    Posts
    392
    loopforever is right, httpd restarted within one minute, so it supposed to be done by DA.

  6. #6
    Join Date
    Jan 2004
    Posts
    97
    I cannot download the file....

  7. #7
    Join Date
    Jan 2004
    Posts
    97
    I've got it now... but i just read that DA should do it... why doesn't DA send me any mail =(

  8. #8
    Join Date
    Jun 2003
    Location
    UK
    Posts
    2,326
    Originally posted by Peter
    I've got it now... but i just read that DA should do it... why doesn't DA send me any mail =(
    Is the service actually down? - try stopping one of the monitored services and see if it makes any difference..
    OptimumServers » Managed Dedicated Servers & General Systems Management » Coming Soon!
    ProWebUK - Quality Web Services
    DirectAdmin Server Checklist

  9. #9
    Join Date
    Jan 2004
    Posts
    97
    Humm, should directadmin send me mail when its down?

  10. #10
    Join Date
    Nov 2003
    Posts
    48
    Anyone have an updated link? I get access forbidden at the prompt and the link won't open in a browser.

  11. #11
    Join Date
    Jun 2003
    Location
    UK
    Posts
    2,326
    Originally posted by RTKS
    Anyone have an updated link? I get access forbidden at the prompt and the link won't open in a browser.
    Link updated.

    Chris
    OptimumServers » Managed Dedicated Servers & General Systems Management » Coming Soon!
    ProWebUK - Quality Web Services
    DirectAdmin Server Checklist

  12. #12
    Join Date
    Aug 2003
    Location
    Schenectady, NY
    Posts
    1,178
    Originally posted by loopforever
    It monitors:

    Apache
    DirectAdmin
    Exim
    MySQL
    Named
    ProFTP
    sshd
    vm-pop3d
    Is this still the case? I've got one box that apache drops out at random times, and doesn't recover until manually reset. Does this "feature" need to be activated someplace?

    Thanks
    Joseph Mack http://www.hostpc.com Since November 1998
    DirectAdmin Hosting and Dedicated Servers Since August 2003

  13. #13
    Join Date
    Dec 2003
    Location
    Salt Lake City, UT
    Posts
    23

    would it hurt to let SIM monitor http?

    Just wondering if anyone has experience letting both DA and SIM monitor HTTP - I know that SIM will catch some types of apache problems that DA might not be able to look for, so it may be advantageous to use both if they don't interfere with one another. Anyone have any thoughts?
    Rob Tyree
    Versaweb Hosting- Now Powered By InterNap!
    Galt Digital Systems - High Quality, Affordable Server Hardware

  14. #14
    Join Date
    Dec 2003
    Posts
    51
    DirectAdmin automatically restarts downed services every minute - where the main path/file for restarts downed services?

  15. #15
    Join Date
    Mar 2004
    Posts
    764
    Originally posted by hostpc.com
    Is this still the case? I've got one box that apache drops out at random times, and doesn't recover until manually reset. Does this "feature" need to be activated someplace?

    Thanks
    I've noticed this as well, this is caused when there are one or more processes still running but not accessible. DA still sees the proces so it does not restart it.
    Onno Vrijburg

  16. #16
    Join Date
    Mar 2005
    Location
    Charlotte, NC
    Posts
    116
    How do you get SIM to monitor DA? My version only looks at Esmin. (Used it a lot on that box when i had it.

    Thanks,
    -drmike

  17. #17
    Join Date
    May 2005
    Posts
    6
    I'm having problems with MySQL, it started 2 days ago. Sometimes MySQL doesn't accept more connections. It shows 'Too many Connections'.

    Can I use this script to solve the problem, or will SIM not see this problem en don't restart the service?

  18. #18
    Join Date
    Feb 2004
    Location
    Colorado
    Posts
    4,111
    If it's reporting to many connections MySQL is still working properly and it's hitting the configuration limit for either that user account, database, or server-wide connection limit to keep it from bringing the whole server down. You might try finding out where this limit is set and increasing it a bit.
    Just do what it takes to make it happen

  19. #19
    Join Date
    Jul 2006
    Location
    India
    Posts
    2
    SMTP restart failed, could not find /etc/init.d/sendmail.

    how to find the actual path

  20. #20
    Join Date
    Mar 2004
    Location
    Oslo/finnmark, Norway
    Posts
    52
    Thanks for a great how-to!

    btw, are you sure on this one:

    NOTE: I DO TAKE RESPONSIBILITY FOR ANY PROBLEMS THIS MAY CAUSE
    Regards,

    Vegard Nilsen
    Onebigbyte.no

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 40
    Last Post: 01-29-2015, 05:15 AM
  2. Brute Force Monitor / Message System
    By kuyenmotdivad in forum Installation / System Requirements
    Replies: 7
    Last Post: 12-15-2011, 09:50 AM
  3. Not receiving mails from SIM(system Integrity monitor)
    By krismars01 in forum Off-Topic Discussion
    Replies: 2
    Last Post: 10-21-2010, 11:12 AM
  4. HOWTO: Control ClamAV from Service Monitor
    By DutchTSE in forum How-To Guides
    Replies: 5
    Last Post: 08-05-2008, 08:57 AM
  5. show spamd information in System Information and Service Monitor
    By dannygoh in forum Feedback & Feature Requests
    Replies: 3
    Last Post: 12-09-2004, 10:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •