New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for a maintenance boolean in API results. #15904
Conversation
If a device is under maintenance, it would be nice to see that from the API. This can help drive other automation workflows where LibreNMS forms a cornerstone in the management source of truth.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adds extra database calls when they are not needed.
You shouldn't add this to common code.
Thanks @murrant . I assume you're requesting an additional API endpoint such as, |
@murrant , so I have built the endpoint. I could use some advice or a pointer with how to regen the bootstrap on a package-installed system so I can test this? Thanks. |
This uses the same endpoint name as for setting a device to maintenance but with a GET verb.
Nevermind. I deleted the cache and tested it. I hope this meets the requirement. It certainly meets my needs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, it seems a little use case specific, but I think that is ok.
This pull request has been mentioned on LibreNMS Community. There might be relevant details there: |
If a device is under maintenance, it would be nice to see that from the API. This can help drive other automation workflows where LibreNMS forms a cornerstone in the management source of truth.
Please give a short description what your pull request is for
DO NOT DELETE THE UNDERLYING TEXT
Please note
Testers
If you would like to test this pull request then please run:
./scripts/github-apply <pr_id>
, i.e./scripts/github-apply 5926
After you are done testing, you can remove the changes with
./scripts/github-remove
. If there are schema changes, you can ask on discord how to revert.