Hello, I guess you can use regex to select both servers in one query servername=~" SERVER1|SERVER2"
On Thu, Apr 2, 2020 at 3:55 PM SQL DBA <[email protected]> wrote: > HI all, > I'm extremely new to prometheus and have some issues with defining a > query. The documentation didn't address the issue I'm having; probably > something really simple but I jus dont see it. Here it is: I have about 50 > SQL Servers that I'm monitoring, this is fine. If I > execute CPU_____SQL_process it returns the info on all of them which is ok. > I can filter down to 1; example - > > CPU_____SQL_process{DB="SQL Server",Env="dev",cluster="Test > node",host="xxxxxxxx",instance="xxxxxxxxx.xxxxxxx.com:9273",job="SQLSERVER_Tst",servername="SERVER1",type="CPU > usage"} > > > This returns fine but is I try to run with 2: > > CPU_____SQL_process{DB="SQL Server",Env="dev",cluster="Test > node",host="xxxxxxxx",instance="xxxxxxxxx.xxxxxxx.com:9273",job="SQLSERVER_Tst",servername="SERVER1",type="CPU > usage"} > CPU_____SQL_process{DB="SQL Server",Env="dev",cluster="Test > node",host="xxxxxxxx",instance="xxxxxxxxx.xxxxxxx.com:9273",job="SQLSERVER_Tst",servername="SERVER2",type="CPU > usage"} > > > I end up with errors - Error executing query: invalid parameter 'query': > parse error at char 195: could not parse remaining input > "CPU_____SQL_pro"... > > From the documentation this should work but I must be missing something or > have something in here I don't need. If anyone has any suggestion thank you > in advance. > > Mike > > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/dda3d8db-55d4-434f-a70c-8937a7172af3%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/dda3d8db-55d4-434f-a70c-8937a7172af3%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CALnV8Wg%2B3%3DHQo%3D7NcDeG5HiuiZEBnTbCG6v5LHKdWS4eMegRDg%40mail.gmail.com.

