0

new to influxdb/telegraf/grafana.

As example, say I have a custom script producing this JSON output:

{
    "ERROR_MSG":"Could not find 'looker.monitoring.alerting.telegraf.scripts'",
    "DETAILS": {
        "HOME_DIR":"/home/me"
    }
}

In my telegraf.conf file, I have:

  [[inputs.exec]]                                                                                                                                commands = [
      "/home/me/telegraf.testing/scripts/looker.monitoring.alerting.telegraf.scripts/telegraf.exec.script.sh"
    ]
    timeout = "10s"
    name_suffix = "_my_looker_collector"
    data_format = "json"
    tag_keys = [
         "ERROR_MSG",
         "DETAILS"
     ]
     json_string_fields = [
         "ERROR_MSG",
         "DETAILS"
     ]

When I start up telegraf, the log output shows:

2022-09-08T14:22:47Z D! [agent] Attempting connection to [outputs.influxdb]
2022-09-08T14:22:47Z D! [agent] Successfully connected to outputs.influxdb
2022-09-08T14:22:47Z D! [agent] Starting service inputs
2022-09-08T14:22:50Z D! [inputs.system] Reading users: open /var/run/utmp: no such file or directory
2022-09-08T14:22:57Z D! [outputs.influxdb] Wrote batch of 15 metrics in 123.103ms
2022-09-08T14:22:57Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-09-08T14:23:00Z D! [inputs.system] Reading users: open /var/run/utmp: no such file or directory
^C2022-09-08T14:23:00Z D! [agent] Stopping service inputs
2022-09-08T14:23:00Z D! [agent] Input channel closed
2022-09-08T14:23:00Z I! [agent] Hang on, flushing any cached metrics before shutdown
2022-09-08T14:23:00Z D! [outputs.influxdb] Wrote batch of 24 metrics in 75.5808ms
2022-09-08T14:23:00Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-09-08T14:23:00Z I! [agent] Stopping running outputs
2022-09-08T14:23:00Z D! [agent] Stopped Successfully

But when I go to grafana UI, I can't seem to find anything. Have no idea what I'm doing wrong, or even if the above config is correct. Any tips appreciated, thank you.

ecorrales
  • 137
  • 11

0 Answers0