OpenShift Telegraf Container

telegraf

#1

Hi,

Could I rename telegraf.conf in any other name?
I have 5 x PODs in OpenShift that uses telegraf and I have only one telegraf.conf as “Config Maps” for all 5 x PODs and I want to split in 5 x different telegraf.conf based on the needs: mongodb, haproxy, etc.

Kind Regards,


#2

I believe this section in Telegraf’s CONFIGURATION.md will answer your question:

The location of the configuration file can be set via the --config command line flag.

When the --config-directory command line flag is used files ending with .conf in the specified directory will also be included in the Telegraf configuration.

You can also create multiple ConfigMaps, each with a telegraf.conf file, but with different ConfigMap names.


#3

Thank you Noah, I’ll try this.


#4

Hello fchiorascu, Might you tell me what telegraf´s plug-in are you using to collect OpenShift? Thanks in advance.


#5

Hi.

I’m using a telegraf container with a python script inside to get the metrics from oc client (openshift).

Kind Regards,
Florian