Search code examples
rrdtoolrrdganglia

How to change the storage path from rrdtool on the Ganglia?


How to change the storage path from rrdtool on the Ganglia?

For example: I have a default configuration in my file gmetad.conf, but I want to change to other storage. how to alter this path?

Where gmetad stores its round-robin databases default: "/var/lib/ganglia/rrds" rrd_rootdir "/some/other/place"

I tried to change the rrd_rootdir, but doesn't work.

Thanks Namir Rachid


Solution

  • Well, you forgot few things. But I will elaborate with more details, but before that, you may need to stop gmetad daemon first:

    Step 1: Create directory where you want to store rrdtool based data of ganglia

    [root@ganglia-server ganglia-3.6.0]# mkdir -p /some/other/place/
    

    Step 2: Make ganglia as the owner of this directory.

    [root@ganglia-server ganglia-3.6.0]# chown -R ganglia /some/other/place/
    

    Step 3: Provide appropriate permission also. You may test it otherwise.

    [root@ganglia-server ganglia-3.6.0]# chmod -R 777 /some/other/place/
    

    Step 4: Enable /some/other/place in gmetad.conf. Don't forget to remove pound symbol.

    # Where gmetad stores its round-robin databases
    # default: "/var/lib/ganglia/rrds"
    rrd_rootdir "/some/other/place"
    # rrd_rootdir "/some/other/place"
    

    Step 5: Test if data is being written in /some/other/place in your gmetad log.

    [root@ganglia-server ganglia-3.6.0]# gmetad/gmetad -d 5 -c /etc/ganglia/gmetad.conf
    Going to run as user ganglia
    Sources are ...
    Source: [my cluster, step 15] has 1 sources
        127.0.0.1
    xml listening on port 8651
    interactive xml listening on port 8652
    .......
    .......
    Updating host ganglia-server, metric cpu_steal
    Created rrd /some/other/place/default/ganglia-server/cpu_steal.rrd
    Updated rrd /some/other/place/default/ganglia-server/cpu_steal.rrd with value 1414567960:0.0
    Updating host ganglia-server, metric load_one
    Created rrd /some/other/place/default/ganglia-server/load_one.rrd
    Updated rrd /some/other/place/default/ganglia-server/load_one.rrd with value 1414567960:0.01
    

    Note: The gmetad executable may be at different location on your machine. Change the location as required to generate the log. In most of the cases, gmetad daemon is installed in "/usr/local/sbin/gmetad".

    Step 6: Start the gmetad daemon now.

    It worked for me. And, hopefully, it should work for you too.