Subscribe

Renaming a site or cluster in Graphite/Grafana/Harvest

[ Edited ]

Hi,

 

A customer of mine setup Harvest and then a few weeks later realized the site naming convention he used, which is the Group drop-down in the Grafana GUI, wasn't ideal.  He asked me how to update it and I thought to share the steps here since others may have this same need.  Also, the steps are basically the same if you want to rename a cluster, or nodes, etc; the find command in step 5 is the important one.  Note, if you have duplicates in the site name, cluster name, or node name, do not use step 5 but instead use the output of step 4 to rename the element you want manually.

 

  1. Stop the pollers (or just the ones you want to rename)
    # /opt/netapp-harvest/netapp-manager -stop

  2.  Edit the /opt/netapp-harvest/netapp-harvest.conf file and change the site field for the different pollers to the ones you want.  So for example change the parameter "site = reallylongname" to "site = AMS".

  3.  On the graphite server cd into the graphite storage directory:

    # cd /var/lib/graphite/whisper (or it could be /opt/graphite/storage/whisper depending on your installation paths)

  4.  Search for your old site name as a sanity check:
    # find . -type d -name reallylongname
    ./netapp/poller/perf7/reallylongname
    ./netapp/poller/perf/reallylongname
    ./netapp/perf7/reallylongname
    ./netapp/perf/reallylongname

  5.  So it looks ok, a few directories with that site were found.  Lets then do rename from reallylongname to AMS:
    # find . -depth -type d -name reallylongname -execdir mv {} AMS \;

  6. Start the pollers 
    # /opt/netapp-harvest/netapp-manager -start

  7. Open your Grafana and see that the Group drop-down includes your new AMS site name and celebrate how much better it looks!

 

Cheers,
Chris Madden

Storage Architect, NetApp EMEA (and author of Harvest)

Blog: It all begins with data

 

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO

 

Re: Renaming a site or cluster in Graphite/Grafana/Harvest

Hi all,

after Chris suggestion, I want to share how it worked for me.

 

Basically, I would like to group many systems under a group (in this example we called it "AMS")

So, after creating the path on the graphite db we will move more than one system's perf under this new path.

 

Stop the pollers (or just the ones you want to rename)
# /opt/netapp-harvest/netapp-manager -stop -poller reallylongname

 

Edit the /opt/netapp-harvest/netapp-harvest.conf file and change the site field for the different pollers to the ones you want. So for example change the parameter "site = reallylongname" to "site = AMS".

 

On the graphite server cd into the graphite storage directory:
# cd /var/lib/graphite/whisper/

 

Make the new group path
# mkdir ./netapp/poller/perf7/AMS && chown _graphite: ./netapp/poller/perf7/AMS
# mkdir ./netapp/perf7/AMS && chown _graphite: ./netapp/perf7/AMS

 

Move the directories accordingly
# mv ./netapp/poller/perf7/reallylongname/reallylongname ./netapp/poller/perf7/AMS/
# mv ./netapp/perf7/reallylongname/reallylongname ./netapp/perf7/AMS/

 

Remove empty dirs
# rmdir ./netapp/poller/perf7/reallylongname
# rmdir ./netapp/perf7/reallylongname

 

Start the pollers
# /opt/netapp-harvest/netapp-manager -start

 

Repeat this procedure for any other system that have to be filed under "AMS" group