Announcement

Announcement Module
Collapse
No announcement yet.

Apache monitoring problem

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Apache monitoring problem

    Dear Percona,

    I encountered my cacti monitoring about apache.
    other graphs (system, mysql, ...) are works fine.


    Code:
    # sudo -u cacti php /usr/share/cacti/scripts/ss_get_by_ssh.php --type apache --host 127.0.0.1 --items gg,gh
    returns:

    gg:-1 gh:-1

    But, server-status has values. wget command returns:


    Code:
    # wget -U Cacti/1.0 -q -O - -T 5 "http://127.0.0.1/server-status?auto"

    Total Accesses: 256
    Total kBytes: 1719
    CPULoad: 4.88119
    Uptime: 404
    ReqPerSec: .633663
    BytesPerSec: 4357.07
    BytesPerReq: 6876
    BusyWorkers: 1
    IdleWorkers: 5
    Scoreboard: W_____............................................ .................................................. ............................
    May cacti user need login setting and passwd for ssh connection?
    sudo command asked a password.

    Code:
    # cat /etc/passwd
    ...
    cacti:x:498:498::/usr/share/cacti:/sbin/nologin
    ...

    Thank you,
    SU
    Last edited by Byun, SungUk; 05-25-2013, 11:45 AM.

  • #2
    Apache template does not use SSH at all. But depending from vars specified it could use the different hostnames in wget command.
    So cacti user does not require ssh or password and you did everything right.

    Are you using the latest PMP version?

    # cat /usr/share/cacti/scripts/ss_get_by_ssh.php|grep version
    $version = '1.0.3';

    If not it won't work with '--items gg,gh' as all items were renamed in 1.0.3.

    Comment


    • #3
      I had the same problem as SU, and found that this line in ss_get_by_ssh.php was the culprit:

      Code:
      $status_server = 'localhost';
      Since I'm trying to monitor a remote server, replacing this with the server's IP addresses made the graphs work. This is OK for now since I'm only monitoring one server with this plugin, but could prove problematic if I setup monitoring for another server.

      Seems like it would be ideal to have this added to the data source template so it could be a per-graph value.

      Comment

      Working...
      X