I have many php-fpm socks on multple servers, and i use telegraf with [[inputs.phpfpm]] to send metrics to influxdb.
This work perfectly but … php-fpm himself sets truncated value for “host” field.
As I can’t find a workaround, in telegraf phpfpm input configuration, to override the tag value with a “dynamic” value that could be extracted from the path blob declared in parameter, I would like to know if anyone has ever encountered such a problem or how you’ll solve it.
regards
In telegraf the host tag is usually the hostname of the system telegraf is running on. I do not see a host field in the phpfpm readme. Are you sure this isn’t the hostname of the system?
in telegraf phpfpm input configuration, to override the tag value with a “dynamic” value
You can use the starlark processor to do dynamic transformation of metrics after they are collected.
Sorry, this is not the “host” tag but the “pool” tag.
Thanks for starlark, it’s really interesting.
I use a wildcard in the “urls” parameter of phpfpm input, do you think I can access the exact url i’m on to extract the “pool” that is a folder in this url ?
The pool tag is truncated because of php-fpm status itself. I can confirm this when i query the sock with cgi-fcgi : pool is truncated.
So I need to get a full pool value, which is in the full file path of the sock.
Maybe I can get this information using starlark ?