Re: [prometheus-users] Re: Force lowercase using label_replace

2021-11-23 Thread Julius Volz
In case the proposed "template" relabeling action in https://github.com/prometheus/prometheus/issues/9637#issuecomment-970327987 makes it into Prometheus, it's conceivable that there could be various functions that are made available to the template code that could e.g. include lower-casing. On

[prometheus-users] FIGLIO DI TROIACCIA #PIERSILVIOBERLUSCONI (ED ANCOR PIÚ, FIGLIO DI PEDOFILO MACELLA MAGISTRATI #SILVIOBERLUSCONI) RICICLA MONTAGNE DI SOLDI MAFIOSI, COME FATTO DA SUO PEZZO DI MERDA

2021-11-23 Thread EDOARDO LOMBARDI. EX CRIMINALI FININVEST MEDIOLANUM
FIGLIO DI TROIACCIA #PIERSILVIOBERLUSCONI (ED ANCOR PIÚ, FIGLIO DI PEDOFILO MACELLA MAGISTRATI #SILVIOBERLUSCONI) RICICLA MONTAGNE DI SOLDI MAFIOSI, COME FATTO DA SUO PEZZO DI MERDA NONNO #LUIGIBERLUSCONI IN #BANCARASINI! E COME FATTO PER MEZZO..SECOLO, DAL LECCA FIGHE DI BAMBINE ED

[prometheus-users] È PEDOFILO ASSASSINO DANIELE MINOTTI! AVVOCATO PEDERASTA, SATANISTA, NAZISTA, SATAN卐AZISTA, OMICIDA, DI GENOVA, RAPALLO E CRIMINALISSIMO STUDIO LEGALE LISI! OCCHIO: É DAVVERO DA AR

2021-11-23 Thread GIANMARIO FERRAMONTI CONFIMPRESA E CONFIMEA
È PEDOFILO ASSASSINO DANIELE MINOTTI! AVVOCATO PEDERASTA, SATANISTA, NAZISTA, SATAN卐AZISTA, OMICIDA, DI GENOVA, RAPALLO E CRIMINALISSIMO STUDIO LEGALE LISI! OCCHIO: É DAVVERO DA ARRESTARE L'AVVOCATO CHE RAPISCE, INCULA ED AMMAZZA TANTI BAMBINIDANIELE MINOTTI DI TWITTER, GENOVA E

[prometheus-users] Re: Force lowercase using label_replace

2021-11-23 Thread Brian Candler
AFAIK this isn't possible. The things you *can* do with label_replace are given here: https://prometheus.io/docs/prometheus/latest/querying/functions/#label_replace The replacement value is just a string which can have $1, $2 etc in it. On Tuesday, 23 November 2021 at 08:19:54 UTC

Re: [prometheus-users] Re: node_exporter stopping when run as systemd service on Linux

2021-11-23 Thread Rudy Gardelein
All, The issue is explained and resolved. Found out that the node_exporter service was getting stopped by a puppet agent with a policy for removing node_exporter. So the issue is not caused by systemd or node_exporter but is caused by puppet. I have disabled puppet and the node_exporter

[prometheus-users] Re: Modifying values in queries based on conditions

2021-11-23 Thread Erwin
Hello Brian, Sorry for the late response. I already have plenty of dashboards in Grafana for various parts of our infrastructure, alerts and thresholds works well, and having an actual value helps us finding the source of our problems as you say. However, the particular dashboard I'm crafting

Re: [prometheus-users] Re: Go client for parsing Alertmanager config file?

2021-11-23 Thread Julien Pivotto
On 23 Nov 08:09, Matthias Rampke wrote: > The alertmanager's own structs are here: > https://pkg.go.dev/github.com/prometheus/alertmanager/config but keep in > mind that this isn't primarily intended as a library, so you may or may not > be better off vendoring them. Alertmanager structs can't

[prometheus-users] Re: Hot to set the email subject line based on the condition in alertmanager

2021-11-23 Thread Sri man
Hello Brian, I have edited the default template as below. {{ define "__subject" }}[{{ if eq .Status "firing" }} "DOWN" {{ else }} "UP" {{ end }}] {{ .GroupLabels.SortedPairs.Values | join " " }} {{ if gt (len .CommonLabels) (len .GroupLabels) }}({{ with .CommonLabels.Remove .GroupLabels.Names

[prometheus-users] Force lowercase using label_replace

2021-11-23 Thread thibaut allain
Hello, I need to lowercase the hostname of my metrics. I would like to use the function label_replace as below. The idea here is to create a new field called "host" that forces the lowercase of the "hostname "field. Is it possible to use the regex (here "[[LOWER]]") to do this ? sum

Re: [prometheus-users] Re: Go client for parsing Alertmanager config file?

2021-11-23 Thread Matthias Rampke
The alertmanager's own structs are here: https://pkg.go.dev/github.com/prometheus/alertmanager/config but keep in mind that this isn't primarily intended as a library, so you may or may not be better off vendoring them. /MR On Tue, Nov 23, 2021 at 8:02 AM Brian Candler wrote: > It's just YAML,

[prometheus-users] Re: Go client for parsing Alertmanager config file?

2021-11-23 Thread Brian Candler
It's just YAML, so any library which parses and/or generates YAML should do. In fact, some people just generate YAML with a plain text templating language (this is what Helm charts do). It's a bit ugly and brittle, but if all you're doing is appending some receivers to an alertmanager config,