XReyRobert / telegraf-nvidia-smi-plugin-on-steroid

Apache License 2.0
2 stars 1 forks source link

Problem configuration telegraf #1

Open Matthieubmt opened 1 year ago

Matthieubmt commented 1 year ago

Hello,

I encountered an issue while attempting to incorporate your code into my Telegraf configuration.

'error loading config file /etc/telegraf/telegraf.conf: plugin inputs.exec: line 3793: configuration specified the fields ["timestamp_key"], but they weren't used'

Can you please advise on the possible cause of this problem?

XReyRobert commented 1 year ago

Hi there, no idea, you can try

/usr/bin/env bash -c '/usr/bin/nvidia-smi -q -x | /usr/local/bin/xq .

make sure that you have all the required command and that the "nvidia_smi_log.timestamp" key is present in the output...

Yomisana commented 1 year ago

Hi there 👋

I think telegraf example conf.

[[inputs.exec.json_v2]]
  measurement_name = "nvidia-smi"
  #timestamp_key= "nvidia_smi_log.timestamp" <<< I looked at similar docs it put in json_v2.object but it still doesn't put data into influxDB for me

I check this: https://github.com/influxdata/telegraf/blob/release-1.13/plugins/inputs/nvidia_smi/README.md

XReyRobert commented 1 year ago

this is my currently running configuration...

[[inputs.exec]]
  ## Commands array
  commands = ["/usr/bin/env bash -c '/usr/bin/nvidia-smi -q -x | /usr/local/bin/xq .'"]
  data_format = "json_v2"

[[inputs.exec.json_v2]]
  measurement_name = "nvidia-smi"

[[inputs.exec.json_v2.tag]]
  path = "nvidia_smi_log.gpu.@id"
  rename = "gpuid"

[[inputs.exec.json_v2.object]]
  timestamp_key= "nvidia_smi_log.timestamp"
  path = "nvidia_smi_log"
  excluded_keys = ["gpu_processes"]
Yomisana commented 1 year ago

Stable Diffusion Public Plane Just in case someone says the control panel is unusable... In Control Panel>Settings>variable

gcs8 commented 9 months ago

For people running into telegraf barfing at this, roll yq back to version 3.2.1 and it should work again.

pip uninstall yq pip install yq==3.2.1

I left a complaint here, if someone who is better at code wants to go add something of value over there. https://github.com/kislyuk/yq/issues/177