This one resolved by adding ~
§  Server Network Interface Up or Down     (Alarm if server doesn’t 
respond)                     ---                
 node_network_up{instance=~"$instance",device!="lo"}  

On Tuesday, June 23, 2020 at 1:48:27 PM UTC-5 Freddy Mack wrote:

> Hello Brian,
> I have attached the PromQL with its output for Linux:
> §  Server Network Interface Up or Down     (Alarm if server doesn’t 
> respond)                     ---                
>  node_network_up{instance="$instance",device!="lo"}
>
> System process monitoring (ex. Set of services on a server if they are 
> running or not)  Alarm if services are not running              --      
>  node_systemd_unit_state{state="failed" , instance=~"$instance"} 
>
> The Linux Dashboard Variable             ----------    label_values(up, 
> instance)   
> On Tuesday, June 23, 2020 at 1:09:51 PM UTC-5 [email protected] wrote:
>
>> You haven't shown any of your queries, and I am not inclined to guess.  
>> But "node_network_up" will show interfaces across all devices.  You 
>> probably want something like:
>>
>> node_network_up{instance="$instance",device!="lo"}
>>
>> As I said, it's up to you to explore the wmi_xxx or windows_xxx metrics, 
>> as I don't do Windows.  As far as I know, Windows doesn't have systemd.
>>
>> As for your problem with systemd metrics on Linux: it's a good idea to 
>> explore these in the Prometheus web UI (x.x.x.x:9090) or the Grafana 
>> "explore" panel.  If you do, you'll see that the systemd metrics have a 
>> separate metric for each state, with value 1 for the current one and 0 for 
>> the others. e.g.
>>
>> node_systemd_unit_state{name="ssh.service",state="activating",type="notify"} 
>> 0
>> node_systemd_unit_state{name="ssh.service",state="active",type="notify"} 1
>> node_systemd_unit_state{name="ssh.service",state="deactivating",type="notify"}
>>  
>> 0
>> node_systemd_unit_state{name="ssh.service",state="failed",type="notify"} 0
>> node_systemd_unit_state{name="ssh.service",state="inactive",type="notify"} 
>> 0
>>
>> So your grafana / PromQL query needs to take this into account.  The 
>> query "node_systemd_unit_state == 1" will filter this to just the one which 
>> represents the current state.
>>
>

-- 
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/eada3458-82d2-46a9-8aa8-a5ff9b8f60f7n%40googlegroups.com.

Reply via email to