Results 1 to 4 of 4

Thread: CACTI

  1. #1

    Default CACTI

    Hi,

    I tried to set up a basic graphs for localhost monitoring and found some issues. Looks like CACTI out of the box openSUSE 12.3 has some issues

    First, after installing you need manually define CACTI through the sysconfig for apache2. Without this cacti's vhost config is ignored and you get 404 when navigating to http://localhost/cacti/

    After defining CACTI in sysconfig I have been able to reach web interface. There are few default graphs already defined: load average, logged in users, memory usage and procceses. But those graphs fails to render because of this error in apache log:

    Code:
    ERROR: opening '/srv/www/cacti/rra/localhost_load_1min_5.rrd': No such file or directory
    ERROR: opening '/srv/www/cacti/rra/localhost_users_6.rrd': No such file or directory
    ERROR: opening '/srv/www/cacti/rra/localhost_proc_7.rrd': No such file or directory
    The rra direcotory is writable by apache:

    Code:
    /srv/www/cacti # ll
    total 1052
    -rw-r--r-- 1 root   root   5945 Jan 28 08:47 about.php
    -rw-r--r-- 1 root   root   5348 Jan 28 08:47 auth_changepassword.php
    -rw-r--r-- 1 root   root  14288 Jan 28 08:47 auth_login.php
    -rw-r--r-- 1 root   root 178349 Jan 28 08:47 cacti.sql
    -rw-r--r-- 1 root   root  21658 Jan 28 08:47 cdef.php
    drwxr-xr-x 2 root   root   4096 Jun 12 17:54 cli
    -rw-r--r-- 1 root   root  26620 Jan 28 08:47 cmd.php
    -rw-r--r-- 1 root   root   6974 Jan 28 08:47 color.php
    -rw-r--r-- 1 root   root  25068 Jan 28 08:47 data_input.php
    -rw-r--r-- 1 root   root  35505 Jan 28 08:47 data_queries.php
    -rw-r--r-- 1 root   root  60117 Jan 28 08:47 data_sources.php
    -rw-r--r-- 1 root   root  32920 Jan 28 08:47 data_templates.php
    -rw-r--r-- 1 root   root   6107 Jan 28 08:47 gprint_presets.php
    -rw-r--r-- 1 root   root   3657 Jan 28 08:47 graph_image.php
    -rw-r--r-- 1 root   root  13469 Jan 28 08:47 graph.php
    -rw-r--r-- 1 root   root   9208 Jan 28 08:47 graph_settings.php
    -rw-r--r-- 1 root   root  17426 Jan 28 08:47 graphs_items.php
    -rw-r--r-- 1 root   root  40166 Jan 28 08:47 graphs_new.php
    -rw-r--r-- 1 root   root  60571 Jan 28 08:47 graphs.php
    -rw-r--r-- 1 root   root  10006 Jan 28 08:47 graph_templates_inputs.php
    -rw-r--r-- 1 root   root  18542 Jan 28 08:47 graph_templates_items.php
    -rw-r--r-- 1 root   root  26703 Jan 28 08:47 graph_templates.php
    -rw-r--r-- 1 root   root  40313 Jan 28 08:47 graph_view.php
    -rw-r--r-- 1 root   root   6022 Jan 28 08:47 graph_xport.php
    -rw-r--r-- 1 root   root  60031 Jan 28 08:47 host.php
    -rw-r--r-- 1 root   root  20031 Jan 28 08:47 host_templates.php
    drwxr-xr-x 2 root   root   4096 Jun 12 17:54 images
    drwxr-xr-x 4 root   root   4096 Jun 12 17:58 include
    -rw-r--r-- 1 root   root   2313 Jan 28 08:47 index.php
    drwxr-xr-x 2 root   root   4096 Jun 12 17:54 install
    drwxr-xr-x 3 root   root   4096 Jun 12 17:54 lib
    -rw-r--r-- 1 root   root   2838 Jan 28 08:47 logout.php
    -rw-r--r-- 1 root   root  27362 Jan 28 08:47 plugins.php
    -rw-r--r-- 1 root   root   4310 Jan 28 08:47 poller_commands.php
    -rw-r--r-- 1 root   root   2243 Jan 28 08:47 poller_export.php
    -rw-r--r-- 1 root   root  18056 Jan 28 08:47 poller.php
    drwxr-xr-x 5 root   root   4096 Jun 12 17:54 resource
    drwxr-xr-x 2 wwwrun www    4096 Jun 12 17:54 rra
    -rw-r--r-- 1 root   root   7394 Jan 28 08:47 rra.php
    drwxr-xr-x 2 root   root   4096 Jun 12 17:54 scripts
    -rw-r--r-- 1 root   root  10820 Jan 28 08:47 script_server.php
    -rw-r--r-- 1 root   root   5761 Jan 28 08:47 settings.php
    -rw-r--r-- 1 root   root   6345 Jan 28 08:47 templates_export.php
    -rw-r--r-- 1 root   root   5835 Jan 28 08:47 templates_import.php
    -rw-r--r-- 1 root   root  19529 Jan 28 08:47 tree.php
    -rw-r--r-- 1 root   root  44997 Jan 28 08:47 user_admin.php
    -rw-r--r-- 1 root   root  65647 Jan 28 08:47 utilities.php
    I checked poller log, it seems to be triggered every 5 minutes, so cron works:

    Code:
    06/13/2013 07:00:01 AM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '1'
    06/13/2013 07:00:04 AM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
    06/13/2013 07:00:04 AM - SYSTEM STATS: Time:2.9900 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0
    06/13/2013 07:05:01 AM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '1'
    06/13/2013 07:05:01 AM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
    06/13/2013 07:05:01 AM - SYSTEM STATS: Time:0.1078 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0
    06/13/2013 07:10:01 AM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '1'
    06/13/2013 07:10:01 AM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
    06/13/2013 07:10:02 AM - SYSTEM STATS: Time:0.1076 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0
    06/13/2013 07:15:01 AM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '1'
    06/13/2013 07:15:01 AM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
    06/13/2013 07:15:01 AM - SYSTEM STATS: Time:0.1074 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0

    Then I found this bug report: 0002229: Fresh Install Doesn't Poll Data Sources - Mantis
    openSUSE 12.3 delivers 0.8.8a, and version fixed set to 0.8.9 (SVN#7323)

    As per bug report I tried a workaround "System Utilities > Rebuild poller cache" and this seems to resolve the issue.
    Now graphs are being drawn, but shows "-nan"

    The command "rrdtool fetch rra/localhost_proc_7.rrd AVERAGE" returns all "-nan".

    The command "rrdtool info rra/localhost_proc_7.rrd":

    Code:
    filename = "rra/localhost_proc_7.rrd"
    rrd_version = "0003"
    step = 300
    last_update = 1371108303
    header_size = 1888
    ds[proc].index = 0
    ds[proc].type = "GAUGE"
    ds[proc].minimal_heartbeat = 600
    ds[proc].min = 0.0000000000e+00
    ds[proc].max = 1.0000000000e+03
    ds[proc].last_ds = "133"
    ds[proc].value = 5.0843998100e+02
    ds[proc].unknown_sec = 0
    rra[0].cf = "AVERAGE"
    rra[0].rows = 600
    rra[0].cur_row = 350
    rra[0].pdp_per_row = 1
    rra[0].xff = 5.0000000000e-01
    rra[0].cdp_prep[0].value = NaN
    rra[0].cdp_prep[0].unknown_datapoints = 0
    rra[1].cf = "AVERAGE"
    rra[1].rows = 700
    rra[1].cur_row = 679
    rra[1].pdp_per_row = 6
    rra[1].xff = 5.0000000000e-01
    rra[1].cdp_prep[0].value = NaN
    rra[1].cdp_prep[0].unknown_datapoints = 5
    rra[2].cf = "AVERAGE"
    rra[2].rows = 775
    rra[2].cur_row = 523
    rra[2].pdp_per_row = 24
    rra[2].xff = 5.0000000000e-01
    rra[2].cdp_prep[0].value = NaN
    rra[2].cdp_prep[0].unknown_datapoints = 17
    rra[3].cf = "AVERAGE"
    rra[3].rows = 797
    rra[3].cur_row = 520
    rra[3].pdp_per_row = 288
    rra[3].xff = 5.0000000000e-01
    rra[3].cdp_prep[0].value = NaN
    rra[3].cdp_prep[0].unknown_datapoints = 89
    rra[4].cf = "MAX"
    rra[4].rows = 600
    rra[4].cur_row = 6
    rra[4].pdp_per_row = 1
    rra[4].xff = 5.0000000000e-01
    rra[4].cdp_prep[0].value = NaN
    rra[4].cdp_prep[0].unknown_datapoints = 0
    rra[5].cf = "MAX"
    rra[5].rows = 700
    rra[5].cur_row = 381
    rra[5].pdp_per_row = 6
    rra[5].xff = 5.0000000000e-01
    rra[5].cdp_prep[0].value = NaN
    rra[5].cdp_prep[0].unknown_datapoints = 5
    rra[6].cf = "MAX"
    rra[6].rows = 775
    rra[6].cur_row = 42
    rra[6].pdp_per_row = 24
    rra[6].xff = 5.0000000000e-01
    rra[6].cdp_prep[0].value = NaN
    rra[6].cdp_prep[0].unknown_datapoints = 17
    rra[7].cf = "MAX"
    rra[7].rows = 797
    rra[7].cur_row = 313
    rra[7].pdp_per_row = 288
    rra[7].xff = 5.0000000000e-01
    rra[7].cdp_prep[0].value = NaN
    rra[7].cdp_prep[0].unknown_datapoints = 89
    Any thought what is wrong and why cacti only shows -nan?

    Thanks

  2. #2

    Default Re: CACTI

    Update.
    Configured cron to redirect poller's output to log and found there this error (for each rrd file):

    ERROR: /srv/www/cacti/rra/localhost_proc_7.rrd: illegal attempt to update using time 1371100504 when last update time is 1371108303 (minimum one second step)

  3. #3

    Default Re: CACTI

    After configuring NTP and leaving CACTI to run for a weekend it seems to work and draws graphs
    Resolved

  4. #4

    Default Re: CACTI

    Also, just for record, 12.3 is also affected by this bug: 0002144: Incorrect time recorded in RRD if PHP and MySQL timezones do not match - Mantis

Tags for this Thread

Posting Permissions

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