[prometheus-users] Details on Prometheus monitoring tool

2023-06-13 Thread Kavita Parmar
My name is Kavita, and I am from Dhatatech, a Singapore-based startup organization. We are currently in the process of developing an AIOPS solution and are actively searching for monitoring tools that enable us to monitor both customer infrastructure and applications within a unified tool.

[prometheus-users] metric_relabel_config negative lookahead

2023-06-13 Thread pandrian
Hey guys im trying to basically drop a specific metric from a job that has a couple of instances but keep it only for one instance is this possible? i tried something like this but its not working. metric_relabel_configs: # Drop the specific metric from all instances except

Re: [prometheus-users] metric_relabel_config negative lookahead

2023-06-13 Thread pandrian
Oh wow! thanks a bunch guys that works! Any chance you could explain step by step how does this work? i lost you on the drop action, if keep label is the set of instance and table then how does this work? im confused :D On Tuesday, June 13, 2023 at 2:38:15 PM UTC+1 Brian Candler wrote: > Or

Re: [prometheus-users] metric_relabel_config negative lookahead

2023-06-13 Thread Ben Kochie
Oh, right, I forgot about the `__` trick. On Tue, Jun 13, 2023 at 3:38 PM Brian Candler wrote: > Or use "__tmp_keep" as the temporary label, then you shouldn't need the > labeldrop step. > > On Tuesday, 13 June 2023 at 14:01:16 UTC+1 Ben Kochie wrote: > >> Negative lookahead regexp syntax is

Re: [prometheus-users] metric_relabel_config negative lookahead

2023-06-13 Thread Ben Kochie
Prometheus Drop and Keep are exclusive. So they work against all metrics that match, or all metrics that don't. What we're doing is taking a metrics like this: mysql_info_schema_table_size{instance_name="primary-00"} mysql_info_schema_table_size{instance_name="secondary-00"} Phase 1 does this:

Re: [prometheus-users] metric_relabel_config negative lookahead

2023-06-13 Thread Brian Candler
Or use "__tmp_keep" as the temporary label, then you shouldn't need the labeldrop step. On Tuesday, 13 June 2023 at 14:01:16 UTC+1 Ben Kochie wrote: > Negative lookahead regexp syntax is not supported. > > https://github.com/google/re2/wiki/Syntax > > What you can do is use use a temporary

Re: [prometheus-users] metric_relabel_config negative lookahead

2023-06-13 Thread Ben Kochie
Negative lookahead regexp syntax is not supported. https://github.com/google/re2/wiki/Syntax What you can do is use use a temporary relabel to mark metrics as "keep". Something like this: metric_relabel_configs: # Drop the specific metric from all instances except primary - source_labels:

[prometheus-users] Re: Changing "instance" label in relabel_configs doesn't work but works in metric_relabel_configs

2023-06-13 Thread Brian Candler
Your "targets" under "static_configs" don't include a port number, so they won't match your regex. Therefore, you can either add :443 to the targets, or you could do relabel_configs: - source_labels: [__address__] target_label: instance Your second test config will likely

[prometheus-users] Re: path_prefix not working

2023-06-13 Thread Brian Candler
1. You have to configure your alertmanager to listen on /my/path 2. I believe you need the leading slash. Here are some working configs taken straight off my system, where the alertmanager path prefix is "/alertmanager" For alertmanager itself, run with this flag: alertmanager ...

[prometheus-users] Re: Questions on Prometheus Agent Mode

2023-06-13 Thread Bartłomiej Płotka
Hi > Can we configure multiple remote-write receivers in agent mode? Yes, you can. All what's written in Remote Write tuning post applies to both agent and normal mode . Remote Write code in Prometheus does not care what type of TSDB DB

[prometheus-users] path_prefix not working

2023-06-13 Thread Damian
Hello! I want to send my alerts to alertmanager with path_prefix. It's working properly without path_prefix. But when I try add path_prefix, the page show me "404 page not found". My prometheus version is 2.12.0 and alertmanager is 0.25.0. I've tried a few options. What should I do wrong?

[prometheus-users] Changing "instance" label in relabel_configs doesn't work but works in metric_relabel_configs

2023-06-13 Thread Igor Sverkos
Hi, I'd like to have a "instance" label value without ":". This seems to be a common task according to - https://www.robustperception.io/controlling-the-instance-label/ - https://groups.google.com/g/prometheus-users/c/I4dVtwI5YrM -

Re: [prometheus-users] metric_relabel_config negative lookahead

2023-06-13 Thread pandrian
Thanks alot Ben and Brian! really appreciated, finally can reduce the cardinality a bit :D On Tuesday, June 13, 2023 at 3:38:29 PM UTC+1 Ben Kochie wrote: > Prometheus Drop and Keep are exclusive. So they work against all metrics > that match, or all metrics that don't. > > What we're doing is

[prometheus-users] Re: Alertmanager to send notifications to google chat

2023-06-13 Thread Near N
Correct, that's same calert I was mentioning previously. I understand the use case of default template, but thought it is possible to do highlighting within the template. It is basically possible by converting the message in a wildcard structure acceptable by Google Chat API, but I couldn't