./rrdgraph_install.sh ?

Discussion in 'Install/Configuration' started by eva2000, Dec 21, 2011.

  1. eva2000

    eva2000 Member

    Hi Gary and George

    Followed the guide at http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:rrd_graph_monitoring for WHM/Cpanel based Litespeed 4.1.9 VPS and seem to get an error maybe to do with different rrdtool install/location ?

    WHM/Cpanel rrdtool install

    Code:
    /scripts/rrdtoolinstall
    RRDtool 1.4.5 is up to date.
    If i manually run the command

    Code:
    /usr/local/lsws/fcgi-bin/lsphp5 /path/to/ls_stats/update.php
    get errors

    Code:
    /usr/local/lsws/fcgi-bin/lsphp5 /path/to/ls_stats/update.php
    #!/usr/bin/php
    Working on cpu
    Error:
    exception 'Exception' with message 'rrdtool version check failed!' in /path/to/ls_stats/includes/rrd.class.php:478
    Stack trace:
    #0 /path/to/ls_stats/update.php(83): rrd->checkVersion('<', '1.2')
    #1 {main}
    Working on load
    Error:
    exception 'Exception' with message 'rrdtool version check failed!' in /path/to/ls_stats/includes/rrd.class.php:478
    Stack trace:
    #0 /path/to/ls_stats/update.php(83): rrd->checkVersion('<', '1.2')
    #1 {main}
    Working on memory
    Error:
    exception 'Exception' with message 'rrdtool version check failed!' in /path/to/ls_stats/includes/rrd.class.php:478
    Stack trace:
    #0 /path/to/ls_stats/update.php(83): rrd->checkVersion('<', '1.2')
    #1 {main}
    Working on lsws_stats
    Error:
    exception 'Exception' with message 'rrdtool version check failed!' in /path/to/ls_stats/includes/rrd.class.php:478
    Stack trace:
    #0 /path/to/ls_stats/update.php(83): rrd->checkVersion('<', '1.2')
    #1 {main}
    My version of rrdtool

    Code:
    /usr/local/cpanel/3rdparty/bin/rrdtool -V
    RRDtool 1.4.5  Copyright 1997-2010 by Tobias Oetiker <tobi@oetiker.ch>
                   Compiled Jun  1 2011 16:45:36
  2. NiteWave

    NiteWave Administrator

    please try:

    modify
    /path/to/ls_stats/config/main.php
    'rrdtool' => '/usr/bin/rrdtool',
    to
    'rrdtool' => '/usr/local/cpanel/3rdparty/bin/rrdtool',
  3. eva2000

    eva2000 Member

    thanks working and much easier than cacti!

    Code:
    #!/usr/bin/php
    Working on cpu
            Creating RRD-file
            Updating RRD-file
    Working on load
            Creating RRD-file
            Updating RRD-file
    Working on memory
            Creating RRD-file
            Updating RRD-file
    Working on lsws_stats
            Creating RRD-file
            Updating RRD-file
    
  4. eva2000

    eva2000 Member

    Seems getting CRON emails every minute now.. there's a logger_mail.class.php so how to disable emails ?
  5. NiteWave

    NiteWave Administrator

    thanks. please try:

    modify
    /path/to/ls_stats/config/log.php
    'logger' => new logger_syslog(),
    to
    'logger' => new logger_file("/tmp/rrdtool.log"),
  6. eva2000

    eva2000 Member

    tried that but seems still sending emails and the log is empty

    there seems to be a log.php.000 and log.php.001 file too ?
  7. NiteWave

    NiteWave Administrator

    will delete those 2 files in package

    please check if file /tmp/rrdtool.log is writable -- it will be updated by cron job.
  8. eva2000

    eva2000 Member

    chmod 0666 /tmp/rrdtool.log

    didn't help still sending emails
  9. NiteWave

    NiteWave Administrator

    Code:
    Seems getting CRON emails every minute now
    this rrdgraph add-on itself don't send out email.

    it looks your cron job send out email once the rrdgraph job runs(it runs once / 1 minute). it may relate to your linux's setting. no email ever received per our tests.
  10. eva2000

    eva2000 Member

    strange i have several other custom cron jobs added and not one of them sends out email themselves.. will double check
  11. NiteWave

    NiteWave Administrator

    maybe in cron job:
    * * * * * $PHP_BIN $DEST_DIR/ls_stats/update.php

    add > /dev/null, i.e.,
    * * * * * $PHP_BIN $DEST_DIR/ls_stats/update.php > /dev/null

    will disable email.
  12. eva2000

    eva2000 Member

    that was it need to update instructions from rrdgraph_install.php

    from

    Code:
    * * * * * /usr/local/lsws/fcgi-bin/lsphp5 /path/to/ls_stats/update.php
    to

    Code:
    * * * * * /usr/local/lsws/fcgi-bin/lsphp5 /path/to/ls_stats/update.php >/dev/null 2>&1
    :)
  13. NiteWave

    NiteWave Administrator

    updated the package.

    * * * * * $PHP_BIN $DEST_DIR/ls_stats/update.php > /dev/null
    is recommended.

    this will redirect STDOUT only to /dev/null, but not STDERR.
    so if there is any error message to STDERR, e.g., "/path/to/lsphp5" is deleted for
    some reason, you'll receive an warning email from logwatch.
  14. eva2000

    eva2000 Member

Share This Page