* ifAdminStatus tells you whether the port is administratively enabled 
(i.e. whether you have explicitly done "shutdown" or not)
* ifOperStatus tells you whether the link is running or not
* there's no physical "cable present" indication.  But if ifOperStatus is 
up, it implies that the cable is plugged in at both ends and link has been 
established.

You can match multiple interfaces like this:

ifOperStatus{instance="IPaddress",ifName=~"Gi0/{6,7,8}"}

This will return multiple timeseries.  You can check how many are up using 
count() or sum() over these timeseries:

count(ifOperStatus{instance="IPaddress",ifName=~"Gi0/{6,7,8}"} == 1)

On Friday, 5 November 2021 at 11:55:23 UTC [email protected] wrote:

> Hi All, 
>
>
> Which metrics do we need to monitor for the switch port status ? 
> 1) ifconnector present
> 2)ifadminstatus
> 3)ifoperstatus
>
> Also please suggest query for combining multiple ports, for an example 
> ifOperStatus {instance="IPaddress",ifName="Gi0/6"}==1, if I wants to 
> include multiple ports means where we need to include. 
>
> Please suggest on this and Thanks in advance
>  
>
>

-- 
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/14977064-ed4b-406b-b427-565ff707362cn%40googlegroups.com.

Reply via email to