On Sunday, 21 June 2020 03:38:05 UTC+1, Freddy Mack wrote:
>
> But on Variable setting if I make the query
> Query: label_values(windows_cpu_time_total, instance)
> Does this good for all other Metrics like , Server Status,Memory,File 
> System,Disk INODE, Server Network,System Process Monitoring
>
>
It's only querying the values of the "instance" label which exist on this 
particular metric, but if this is a representative metric which is present 
for all Windows machines, it should be OK.

Another option: if all your Windows machines are in the same prometheus 
scrape job, and that job is called "windows" say, then you could use

     label_values(up{job="windows"}, instance)
 

> Also I have this query for Linux Dashboard
> label_values(up, instance)
> Is this good for all the metrics ?
>
>
Yes that's fine too - although it will let you select *all* instances, 
including ones which aren't Linux machines (e.g. scrape jobs for Windows 
machines; scrape jobs for blackbox_exporter, snmp_exporter etc)

So if your dashboard shows metrics from node_exporter, and the scrape job 
is called "node", you could limit it to

label_values(up{job="node"}, instance)

 

>
> Can I get the syntax for these Metrics for windows to go in alert.rules 
> file and in Grafana:
>
>         System messages (ex. Errors in /var/log/messages)          Any 
> critical errors reported in log
>

You will need an exporter which parses your log files.  Options include 
mtail and grok_exporter.

Alternatively: store your logs in Loki.  As well as storing/archiving your 
logs and making them visible in Grafana panels, can use LogQL queries which 
are similar to PromQL queries.
There is a nice talk here: https://www.youtube.com/watch?v=TcmvmqbrDKU

 

>     Disk INODE utilization                     Warning at 90%, Alarm at 95%
>     System process monitoring (ex. Set of services on a server if they are 
> running or not)  Alarm if services are not running.
>
>
I don't really do Windows - you'll have to look at what metrics the 
wmi_exporter returns and find the ones which apply.  Look at the exporter 
documentation, or just use the prometheus GUI to explore all metrics whose 
names start with "windows_"

Good luck,

Brian.

-- 
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/761bf741-de79-4276-82ad-160d0ece6390o%40googlegroups.com.

Reply via email to