Please explain me device status purposes

1,583 views
Skip to first unread message

Виталий Ковалев

unread,
Sep 28, 2021, 4:22:14 AM9/28/21
to NetBox
Hello. Can someone explain me purposes of the built-in device statuses?
I'm thinking about polling devices in future and changing its status, depending of poll result, and don't understand which status i should use Offline or Failed?
For clearance I want know purpose of each status for device.

Brian Candler

unread,
Sep 28, 2021, 6:22:07 AM9/28/21
to NetBox
I use the status in Netbox to configure my polling.  That is: I extract the list of targets to poll for prometheus via the Netbox API, and only include those with status "Active".  If I switch it to "Offline" this means I don't want it polled any more.

This is more in the spirit of Netbox, which is that Netbox is a source of truth about how you want the network to be right now; Netbox is used to populate other systems, not to be populated by other systems.  To quote the documentation:  "As such, automated import of live network state is strongly discouraged"

By the same token: if a machine stops responding in your monitoring system, it's a human decision as to whether this represents a failure or not.  Therefore, it should be a human who sets the status to "Failed" (if the device is awaiting repair or replacement) or "Offline" (if it has been intentionally powered off).  No monitoring system knows the intention behind such a change.

Виталий Ковалев

unread,
Oct 4, 2021, 11:22:01 PM10/4/21
to NetBox
Thanks!
Couple of questions...
I think that if a machine stops responding in your monitoring system, your monitoring system should set the status to failed. And after that, network administrator, should check it and decide what the current status of device.
What problems I will get with this way?
What about other statuses?
As i understand meaning of each status is:
Acitve - device work properly
Offline - device was shutdown by administrator
Planned - device WILL be installed at some site
Staged - ?
Failed - there was error with device polling
Inventory - ?
Decomissioning - device will be removed

With "staged" and "inventory" statuses, i was totally disappointed :
Staged- device already installed in some rack. But! Does device ready to turn on?Everything, needed for enabling, have done(cables,sfp)? If device ready what difference with offline?
Inventory - Does it status for devices like cable organiser and something like or for devices which exist at some store(for replacing broken devices and installing new)?
вторник, 28 сентября 2021 г. в 22:22:07 UTC+12, Brian Candler:

Brian Candler

unread,
Oct 5, 2021, 4:21:03 AM10/5/21
to NetBox
Netbox is open source software, and you are free to use it as you like, but if you use it in a way other than it was designed to be used, you get to accept the consequences.  I repeat what the documentation says most clearly: "As such, automated import of live network state is strongly discouraged"

The problems you will get are basically down to no longer being able to trust what Netbox tells you.  For example: suppose that as you propose, you automatically set the status to "Failed" as soon as monitoring fails to poll a device.  But that was due to a blip in the network.  Either it comes back on the next poll (in which case you have to set it back to "Active" again?), or you will have configured your monitoring to stop polling it.

But the main point is, you can no longer use Netbox to *control* your monitoring if it is being *updated* by monitoring.  Netbox becomes nothing more than a *portal* on your monitoring.  At that point, 90% of the value of Netbox is gone, because you can't use it as a source of truth to *configure* your other systems.

As for the status values: they have whatever meaning you ascribe to them which is meaningful in your organization, in the context of your own operational procedures for commissioning and decommissioning hardware.

Виталий Ковалев

unread,
Oct 5, 2021, 11:23:46 PM10/5/21
to NetBox
I understand that I'm free to use Nebox as i wish, but I wan't understand the best way i can use it/ how most people use it.
For example, statuses was hardcoded, with some generic logic for all IT/Network/etc companies and purpose of each status.
Could you tell me how do you use each of the statutes?
About polling - could you tell me about what do you do when device polling failed?
Thank you so much for your help!



вторник, 5 октября 2021 г. в 20:21:03 UTC+12, Brian Candler:

Виталий Ковалев

unread,
Oct 6, 2021, 12:13:46 AM10/6/21
to NetBox
Another one question - if "NetBox intends to represent the desired state of a network", what purpose of "Failed" status?
I think there aren't administrator who wants "failed" devices =)

среда, 6 октября 2021 г. в 15:23:46 UTC+12, Виталий Ковалев:

Brian Candler

unread,
Oct 6, 2021, 3:48:24 AM10/6/21
to NetBox
As I said in my first post: I use Netbox as a source of truth to *configure* other services.

I don't want monitoring to poll known failed devices.  Apart from wasting resources, I don't want any more alerts from a device which is known for sure to be out of service.  Therefore, when I set the status of a device to "Failed" in Netbox, this automatically removes it from the monitoring configuration.

> what do you do when device polling failed?

The monitoring system generates an alert, and I look at it.  In the mean time I keep polling it, because Netbox still says it's an Active (and maybe it will come back).  After a human has triaged the problem, *if* the issue is that the device itself is broken and will remain that way for a while, then I set the status to "Failed". 

Just because a device fails to respond to monitoring, doesn't mean that the device itself has failed.  It could be the network connection to it, for example.

> if "NetBox intends to represent the desired state of a network", what purpose of "Failed" status?

In this example, the "desired" state of my monitoring service is only to poll devices which should be responding.  That information is pushed from Netbox to the monitoring platform.

In other words, Netbox is like a control panel, that represents the desired state of the entire network *and* the downstream systems which are controlled by it.  It's not a portal onto data collected by other systems: I still need to look at the monitoring platform, analyze logs etc.  To build visibility of operational status you'll want something that generates dashboards, like Grafana, and something which gives you historical records of metrics and logs, like Prometheus and Loki.

Виталий Ковалев

unread,
Oct 7, 2021, 7:47:05 PM10/7/21
to NetBox
Thanks! It was helpful. I think I got it.

среда, 6 октября 2021 г. в 19:48:24 UTC+12, Brian Candler:
Reply all
Reply to author
Forward
0 new messages