Telegraf logparser output prometheus_client help needed

This sounds like the create static fields parsing log files issue. There is a workaround in the upcoming 1.7 release though by creating a tag and then converting it to a field. If you try this you will need to use the nightly build.

[[inputs.logparser]]
  files = ["/var/log/foo"]
  from_beginning = true
  [inputs.logparser.grok]
    # add hostname as a string field for now to satisfy "at least one field" requirement.
    patterns = ["%{TIMESTAMP_ISO8601} %{DATA:hostname} %{GREEDYDATA}"]
    measurement = "errors_count"
  [inputs.logparser.tags]
    value = "1"

[[processors.converter]]
  namepass = ["errors_count"]
  [processors.converter.tags]
    integer = ["value"]
  [processors.converter.fields]
    tag = ["hostname"]

[[aggregators.basicstats]]
  namepass = ["errors_count"]
  drop_original = true
  period = "10s"
  stats = ["sum"]