Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

pcp2graphite - pcmd hostname in prefix under pmmgr #78

Closed
screentan opened this Issue Feb 24, 2016 · 2 comments

Comments

Projects
None yet
3 participants

Now that pcp2graphite is supported under pmmgr we would like to use it to put data directly into graphite or graphite compatible data store. The prefix defaults to "pcp." and though it can be changed via "-m", there does not appear to be a way to automatically change it while using pmmgr. So 100 instances of pcp2graphite would dump the data under "pcp." instead of "pcp.host.". Assuming I didn't miss something I would like to see a change in the way the prefix is handled.

The default should be "pcp." as it is currently. I'm reqeusting that If the "-h " option is used then the prefix should be "pcp..". Another option would be to have some kind of variable expansion within the pmmgr configuration files.

Contributor

fche commented Feb 24, 2016

This could be accomplished with a small auxiliary shell script invoked by /etc/pcp/pmmgr/monitor

#! /bin/sh
# assume pmmgr invocation as -h $HOSTSPEC
host="$2"
graphitehost=`pmprobe -v -h "$host" pmcd.hostname | awk '{print $3}' `  # or something like that
exec pcp2graphite [...options...] -m "pcp.$graphitehost" -h "$host"
Contributor

natoscott commented Mar 10, 2016

Sounds like that approach is feasible for you @screentan based on lack of followups? I'll close the issue, please re-open as necessary.

@natoscott natoscott closed this Mar 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment