Netbox: Add "Maintenance" Status to Device

Created on 26 Feb 2020  路  7Comments  路  Source: netbox-community/netbox

Environment

  • Python version: 3.7
  • NetBox version: 2.7.6

Proposed Functionality

Add a new choice to DeviceStatus of Maintenance to denote when a machine is undergoing maintenance.

Use Case

Denoted a device as in Maintenance means it is an active machine that had to come offline momentarily for some maintenance...either upgrade, hardware fix, or whatever reason.

We currently hack this in to easily communicate what machines have hardware issues between teams and automation tools

Database Changes

Technically none, unless you count changing a ChoiceSet, in which case it's adding an enumeration to the Device.status

External Dependencies

N/A


Note that this is a very small addition that I could create a PR for once approved.

Most helpful comment

While tempted to up-vote this, I think it opens a whole set of additional 'small' FR's that will end up with a 'so-and-so' maintenance framework that should have been setup as a better designed solution.
E.g.: maintenance state on sites and circuits. But also discussions around whether this is supposed to be for preventive maintenance or 'known to be broken' as well. Until there is a wider thought through solution I would prefer tagging resources with your own labels for the moment.

All 7 comments

Would love to see this turned into a larger PR that provides some kind of maintenance tracking. We're currently looking to migrate to netbox while at the same time looking for some solid maintenance tracking solution with hooks to let us perform additional external tasks once a maintenance has been scheduled and once the maintenance window has begun.

@bcavns01 The best way to show your support for an issue is to click the "add reaction" button (plus sign with a smiley face) at the top right of the original post and add a thumbs up.

@tyler-8 Sure, will do.
I was trying to give context and not just +1 it since the issue proposes a similar but reduced version of what we're looking for.

Didn't want to distract things by opening a separate issue for what seemed like just an expansion on an existing issue.

Would love to see this turned into a larger PR that provides some kind of maintenance tracking.

This is a request to add an additional status value, nothing more. Anything beyond that would need a separate FR, but I should tell you now that we're not currently accepting any requests for major new features.

While tempted to up-vote this, I think it opens a whole set of additional 'small' FR's that will end up with a 'so-and-so' maintenance framework that should have been setup as a better designed solution.
E.g.: maintenance state on sites and circuits. But also discussions around whether this is supposed to be for preventive maintenance or 'known to be broken' as well. Until there is a wider thought through solution I would prefer tagging resources with your own labels for the moment.

Maintenance is like sub state of offline or failed? the state might lead different usage by different people inside the same organization or department.

IMO "under maintenance" is a short-lived status; typically measured in hours. I don't think it makes sense to use the status field to indicate this temporary condition, because you lose the original status when it's changed.

An example: There are 20 servers in a rack. 17 are active, two are staged, and one is failed. You select all, click edit, and set the status to "maintenance." After the maintenance window has been completed, you select the devices again and set the status to... what? You'll have to dig through the change log or some other notes to determine what the original status of each device was.

This is why I think @sdktr's suggestion to employ tags for this purpose is more practical. Apply the tag at the start of the maintenance, remove it at the end, and everything is right back to its original state with minimal fuss.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bellwood picture bellwood  路  4Comments

billyzoellers picture billyzoellers  路  3Comments

luto picture luto  路  3Comments

shugotek picture shugotek  路  3Comments

robbagithub picture robbagithub  路  3Comments