[prometheus-users] remote write mTLS

2022-02-23 Thread Victor Borisik
I'm trying to set up Prometheus-to-Prometheus metrics flow, I was able to 
do it by flag *--enable-feature=remote-write-receiver*.
However I need to have mTLS there, can someone advice a manual or post a 
config sample?
Appreciate you help

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/5b7d42bb-cc16-4645-b9c9-d69ac0439616n%40googlegroups.com.


Re: [prometheus-users] Alertmanager Sendgrid WEB API Integration

2022-02-23 Thread Stuart Clark

On 22/02/2022 19:06, Dennis Naranjo wrote:


Does anyone here knows if it exists a way to integrate Alertmanager 
with the Sendgrid WEB API?


Currently I'm using the SMTP API integration, but I'd like to take 
advantage of the WEB API instead


If you have the API details for the Sendgrid Web API then yes. There is 
the webhook mechanism for Alertmanager which allows you to send alerts 
to anything you want, via a small service/lambda that translates from 
the webhook API to the destination API. There are numerous such services 
that are available already (e.g. for sending alerts to MS Teams), but 
I'm not sure if a Sendgrid one has already been written.


--
Stuart Clark

--
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/521feaf9-eba6-2317-a93a-382c01dc37c1%40Jahingo.com.


[prometheus-users] Re: Is it possible to use prometheus in such a scenario

2022-02-23 Thread Brian Candler
What do you mean by "querying with a different hostname"?

Some Prometheus exporters accept URL query parameters to control what they 
do, e.g.
http://localhost:9115/probe*?module=http=foo*
That's a perfectly valid thing to do.  The prometheus server can specify 
these query parameters using "params" setting in the scrape job, or 
__param_XXX labels.

Hence if you're going to write your own exporter that performs SQL queries, 
it's perfectly fine to adjust the SQL query using values from the query 
parameters.

What you *don't* want to do is to return different data *depending on which 
host is making the query *(i.e. where the scrape is coming from)

On Wednesday, 23 February 2022 at 06:57:54 UTC rbf@gmail.com wrote:

> Thanks for the answer, I meant that I already have a SQL database with the 
> required data. And now, when using some kind of sql exporter, is it 
> possible to configure the config for each metric once, but so that when 
> querying with a different hostname, the sql query changes?
>
> Maybe it looks like this:
> query:  select value from perfmon where hostname = %variable% 
>
> Maybe I do not understand how this should work, I just started looking for 
> a solution
>
> среда, 23 февраля 2022 г. в 09:19:33 UTC+3, Brian Candler: 
>
>> Prometheus is not a SQL database: it's a time series database and has its 
>> own query language, PromQL.
>>
>> Each timeseries is uniquely identified by a metric name (which describes 
>> the type of thing you're measuring) and a set of labels (which taken 
>> together identify one particular instance of that thing).  A common label 
>> is "instance" which normally identifies the host the metric came from. Here 
>> are a few simple PromQL queries:
>>
>> node_filesystem_avail_bytes
>>
>> node_filesystem_avail_bytes{instance="server1"}
>>
>> node_filesystem_avail_bytes{instance="server1",mountpoint="/"}
>>
>> The first query returns a vector with available space on all filesystems.
>> The second query returns a vector with available space on all filesystems 
>> on one particular host (which still may be multiple results)
>> The third instance constrains the query more specifically to a single 
>> filesystem.
>>
>> There is lots of documentation online, both official and various blogs, 
>> which can tell you more.
>>
>> On Tuesday, 22 February 2022 at 19:56:58 UTC rbf@gmail.com wrote:
>>
>>> Good afternoon, 
>>> is it possible to use prometheus for such a scenario:
>>> One database, one request but with different parameters?
>>> Example:
>>> select value from perfmon where hostname = 'some hostname'
>>> There are many such hostnames, I would like to have one configuration 
>>> file for all hosts. Is it possible?
>>> Hostnames are specified in grafana variables.
>>>
>>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/48639d1b-8e3d-4a51-8287-72879e4f1ca4n%40googlegroups.com.