This shows you the differences between two versions of the page.
software:performance_co-pilot:openmetrics [2021/06/16 12:04] – created chris | software:performance_co-pilot:openmetrics [2022/11/13 12:06] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Openmetrics example ===== | ||
+ | How to get simple own textfiles into metrics? | ||
+ | < | ||
+ | dnf -y install pcp-pmda-openmetrics | ||
+ | cd / | ||
+ | |||
+ | ### example 1, via URL | ||
+ | echo ' | ||
+ | cat >/ | ||
+ | # HELP my simple test value | ||
+ | # Type testval gauge | ||
+ | var 12.3 | ||
+ | EOT | ||
+ | |||
+ | ### example 2, via executable | ||
+ | cat > | ||
+ | #! /bin/sh | ||
+ | awk '{ | ||
+ | print("# | ||
+ | print("# | ||
+ | printf(" | ||
+ | printf(" | ||
+ | printf(" | ||
+ | }' / | ||
+ | EOT | ||
+ | chmod +x config.d/ | ||
+ | |||
+ | ### example 3, via executable | ||
+ | cat > | ||
+ | #!/bin/sh | ||
+ | cat / | ||
+ | EOT | ||
+ | |||
+ | # as last part in / | ||
+ | log advisory on every 1 second { | ||
+ | openmetrics | ||
+ | } | ||
+ | systemctl restart pmlogger | ||
+ | pminfo openmetrics | ||
+ | pmrep openmetrics | ||
+ | </ | ||
+ | * 'man pmdaopenmetrics' | ||
+ | * https:// | ||
+ | * https:// | ||