02-03-2021 06:21 PM
Hi,
I just made a simple script using NBI explorer that gives back device name and status and port ID:
query {
network {
devices {
up
sysName
deviceData {
ports {
portAdmin
ifIndex
}
}
}
}
}
Now i would add port status (up/down), i tried with portAdmin, but it gives back the adiministrative status.
In the library there is a value IfOperStatus (like SNMP), but i dont know how to put this variable in the script, it is not accepted in any place of the structure.
Can anybody help me ? I’m a newby in programming..
Solved! Go to Solution.
02-04-2021 08:13 AM
Hi farmanni,
Have a look into the DeviceEntityData. It provides the ifOperStatus and ifAdminStatus.
{
network {
devices {
up
sysName
entityData {
allPorts {
ifIndex
ifOperStatus
ifAdminStatus
ifSpeed
}
}
}
}
}
02-04-2021 08:47 AM
Thanks a lot, it works
02-04-2021 08:13 AM
Hi farmanni,
Have a look into the DeviceEntityData. It provides the ifOperStatus and ifAdminStatus.
{
network {
devices {
up
sysName
entityData {
allPorts {
ifIndex
ifOperStatus
ifAdminStatus
ifSpeed
}
}
}
}
}