Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Page 1 of 4 1234 LastLast
Results 1 to 15 of 50

This is a discussion on JagMonitor - Monitoring script for WHM in the VPS & Dedicated forum
-= JagMonitor v1.3 =- INTRODUCTION ------------ This is a monitoring script for cPanel/WHM servers, dedicated or VPS. It's shamelessly copied from other scripts, some of ...

  1. #1
    Loyal Client thisisit3's Avatar
    Join Date
    Mar 2007
    Posts
    642

    JagMonitor - Monitoring script for WHM

    -= JagMonitor v1.3 =-


    INTRODUCTION
    ------------
    This is a monitoring script for cPanel/WHM servers, dedicated or VPS. It's shamelessly copied from other scripts, some of my own and others found on cpanel.net.


    INSTALLATION
    ------------
    First, edit the file jagmonitor.php and at the top change the available configuration options.

    Then run "./install.sh" in the current directory as root to install the script.

    Login as root in WHM, or if you are already there then just refresh the page. Go to the bottom of the left side frame, under "Plugins" and click on "JagMonitor". You may also spawn the page on a separate window if you want, so it takes the full width of the browser.


    UPGRADE
    -------
    Just make the same changes in the new jagmonitor.php and re-run "./install.sh", the script will overwrite the old files with the new ones.


    TROUBLESHOOTING
    ---------------
    The addon_jagmonitor.cgi executes cPanel's PHP executable under: /usr/local/cpanel/3rdparty/bin/php-cgi (or just php in the older cPanel/WHM versions). In case the script doesn't load (white page, file not found error, etc) it probably means the location to the PHP executable is different. Edit the file addon_jagmonitor.cgi and either change the path or uncomment the PHP v5 version of the script execution.


    CHANGELOG
    --------------
    v1.3 - check for php executable in newer cPanel, new monitor (DoS attack)
    v1.2 - new monitors, dynamic interface
    v1.1 - fix php execution on some servers
    v1.0 - initial release
    Attached Files Attached Files

  2. #2
    I didn't do it! Daniel_DBS's Avatar
    Join Date
    Aug 2007
    Location
    Mars
    Posts
    1,204
    This script is awesome! Anyone on a cPanel/WHM VPS or Dedicated server SHOULD install it!
    -Daniel

    If the automobile had followed the same development cycle as the computer, a Rolls-Royce today would cost $100, get a million miles to the gallon, and explode once every few weeks.

    My scripts never have bugs. They just develop random features.

  3. #3
    I didn't do it! Daniel_DBS's Avatar
    Join Date
    Aug 2007
    Location
    Mars
    Posts
    1,204
    Here's a screen shot for anyone wondering what it looks like before installing it:
    Attached Images Attached Images
    -Daniel

    If the automobile had followed the same development cycle as the computer, a Rolls-Royce today would cost $100, get a million miles to the gallon, and explode once every few weeks.

    My scripts never have bugs. They just develop random features.

  4. #4
    JPC Senior Member
    Join Date
    Nov 2007
    Posts
    55
    Great utility, the installation instructions could do with a little tweaking though...

    Nice work!

  5. #5
    all about nothing! Frank Broughton's Avatar
    Join Date
    Jan 2006
    Posts
    2,158
    All is working on my VPS cept the Apache section, get this error:

    Not Found

    The requested URL /server-status was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to
    use an ErrorDocument to handle the request.
    Any ideas on a fix....

  6. #6
    I didn't do it! Daniel_DBS's Avatar
    Join Date
    Aug 2007
    Location
    Mars
    Posts
    1,204
    Hmmmm WEIRD Frank! Mine in the Apache section said it wouldn't work without a certain module installed, so I researched a bit on the net and found the module and installed it... Works fine now!
    -Daniel

    If the automobile had followed the same development cycle as the computer, a Rolls-Royce today would cost $100, get a million miles to the gallon, and explode once every few weeks.

    My scripts never have bugs. They just develop random features.

  7. #7
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Frank,

    I'n Interworx there is a link for server status, but it is disabled by default. When you click the link it gives you these instructions for enabling it:

    No Server Status Available

    To get server-status working you'll have to edit your httpd.conf file which is usually located at /etc/httpd/conf/httpd.conf. Just append the following code to the httpd.conf file and restart Apache

    Code:
    ExtendedStatus On
    
      <Location /server-status>
        SetHandler server-status
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1
      </Location>
    Essentially it allows Apache to report its status, but only to localhost (probably a good thing, since the goal here is to secure the server). I suspect doing using the above code will work equally well on a cP server.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  8. #8
    all about nothing! Frank Broughton's Avatar
    Join Date
    Jan 2006
    Posts
    2,158
    Jason I found this in my httpd.conf file:
    <Location /whm-server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    </Location>

    ExtendedStatus On
    Do you think adding in your code above would mess things up?

  9. #9
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    No, it shouldn't, although you don't need to do the "ExtendStatus" line a second time. The <Location> block means "handle requests for this URI as follows" so all you'd be doing is providing server-status info with two URIs.

    I think you can also use <Location whm-server-status|server-status> to map both names within one block.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  10. #10
    all about nothing! Frank Broughton's Avatar
    Join Date
    Jan 2006
    Posts
    2,158
    That did the trick Jason. Once again thanks!

  11. #11
    I didn't do it! Daniel_DBS's Avatar
    Join Date
    Aug 2007
    Location
    Mars
    Posts
    1,204
    Mwahaha according to JagMonitor, my cPanel VPS is only using 113MB of RAM!!! I debloated it a bit... I disabled all of the mail services since I use Google Apps for all of my domains... I disabled FTP, I got it all tweaked! Its running better than ever!!!
    -Daniel

    If the automobile had followed the same development cycle as the computer, a Rolls-Royce today would cost $100, get a million miles to the gallon, and explode once every few weeks.

    My scripts never have bugs. They just develop random features.

  12. #12
    Loyal Client thisisit3's Avatar
    Join Date
    Mar 2007
    Posts
    642
    I'm glad you found my script useful.

    For some reason many apache installations running along side with WHM have "server-status" disabled, the above instructions to enable it are correct.

    I'm all open to suggestions.

  13. #13
    04 LeeUmm's Avatar
    Join Date
    Oct 2002
    Location
    Hamilton, Ontario
    Posts
    642
    Looks great. I'll install on Monday when I get back to work. Just posting so I'll remember, and to say thanks
    Nomsane?
    That is all.

  14. #14
    Loyal Client thisisit3's Avatar
    Join Date
    Mar 2007
    Posts
    642

    Thumbs up

    I've updated the script. The new version includes new monitors as well as a dynamic interface, which means that you can enable/disable any of the monitors.

    Enjoy!

  15. #15
    JPC Senior Member
    Join Date
    Nov 2007
    Posts
    55
    Thanks for the update, works a charm.

    For a manual update:

    1.) Configure the new jagmonitor.php with your desired options
    2.) Copy jagmonitor.php to /usr/local/cpanel/whostmgr/docroot/3rdparty/jagmonitor
    3.) Copy addon_jagmonitor.cgi to /usr/local/cpanel/whostmgr/docroot/cgi/

    Overwrite any existing files.

    All done.

Page 1 of 4 1234 LastLast

Bookmarks

Posting Permissions

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