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 [email protected] 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/b1d2f758-e5a8-4dce-8a3e-e10e684113e2n%40googlegroups.com.