snmp_exporter regex

99 views
Skip to first unread message

Антон Зубков

unread,
Jan 28, 2021, 6:15:52 PM1/28/21
to Prometheus Users
Hi,
Have a little problem with Dell iDrac 8 SNMP. Log dates have 20201222152131.000000+120 format. How can I regex in DD\MM\YYYY HH:MM:ss format?
In telegraf this is:
[[processors.regex]]
  [[processors.regex.fields]]
    key = "log-dates"
    pattern = "^(?P<YYYY>\\d{4})(?P<MM>\\d{2})(?P<DD>\\d{2})(?P<HH>\\d{2})(?P<mm>\\d{2})(?P<ss>\\d{2})\\.(?P<SSSSSS>\\d{6})(?P<ZZ>[-+]\\d{3,4})$"
    replacement = "${YYYY}-${MM}-${DD} ${HH}:${mm}:${ss}"

How do the same in snmp_exporter or Prometheus?
 Thanks!

Антон Зубков

unread,
Jan 30, 2021, 9:42:58 AM1/30/21
to Prometheus Users
Where can I read doc about overrides and regex_extracts:? I try but errors every time...

пятница, 29 января 2021 г. в 01:15:52 UTC+2, Антон Зубков:

Ben Kochie

unread,
Jan 30, 2021, 9:46:43 AM1/30/21
to Антон Зубков, Prometheus Users
What OIDs/MIBs are you looking at?

Prometheus is not a logging system, This data would likely break your Prometheus server.

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/34434852-216d-43a8-bd75-3d1a9488f1b6n%40googlegroups.com.

Антон Зубков

unread,
Jan 30, 2021, 9:55:13 AM1/30/21
to Prometheus Users
iDRAC-SMIv2::eventLogDateName / 1.3.6.1.4.1.674.10892.5.4.300.40.1.8
From snmp_exporter I get 20201222152131.000000+120 but I need 12/22/20 15:21:31



суббота, 30 января 2021 г. в 16:46:43 UTC+2, sup...@gmail.com:

Ben Kochie

unread,
Jan 30, 2021, 10:06:43 AM1/30/21
to Антон Зубков, Prometheus Users
Yes, these are event logs. They contain too much cardinality and are not something you can put in Prometheus. I recommend using a logging system, like a syslog service.

Антон Зубков

unread,
Jan 30, 2021, 10:09:58 AM1/30/21
to Prometheus Users
It does not matter. The question is how to change the data output, not about the logs. It can be anything.

суббота, 30 января 2021 г. в 17:06:43 UTC+2, sup...@gmail.com:

Roman Baeriswyl

unread,
Jul 17, 2022, 12:26:15 AM7/17/22
to Prometheus Users
Did you ever find a solution for this?
Reply all
Reply to author
Forward
0 new messages