Add documentation for DHCP stats#3785
Conversation
|
Marking as draft while I test the migration guide... |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3785 +/- ##
=======================================
Coverage 63.32% 63.32%
=======================================
Files 619 619
Lines 45873 45873
Branches 43 43
=======================================
Hits 29051 29051
Misses 16812 16812
Partials 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The last fixup commit removes documentation for ISC DHCP servers, since there is a chance this PR makes the NAV 5.17 window, but I don't see the branch that adds support for ISC DHCP servers making the NAV 5.17 window |
lunkwill42
left a comment
There was a problem hiding this comment.
wow, this is pretty comprehensive and nice - possibly one of the more detailed reference guides in the NAV docs 😄
It's good to see you have provided migration guides, even though I'm 99% sure that no one has set up DHCP stats collection in NAV while a GUI was missing 😉
I only have a few suggested changes, really...
| Updating the Crontab Entry | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| Next, a cronjob for the program :program:`navdhcpstats` that runs periodically | ||
| every 5 minutes must be installed: | ||
|
|
||
| 1. Save the following snippet in a file called :file:`navdhcpstats` in NAV's | ||
| :file:`etc/cron.d/` directory: | ||
|
|
||
| .. code-block:: console | ||
| :caption: etc/cron.d/navdhcpstats | ||
|
|
||
| */5 * * * * navdhcpstats | ||
|
|
||
| 2. Install the cronjob by running ``nav start navdhcpstats``. | ||
|
|
||
| .. _kea_dhcpv4_servers: |
There was a problem hiding this comment.
Realistically, 99.9% of users will not have to do anything here. New cron snippets are installed automatically when NAV is upgraded. Changed snippets will also overwrite old ones, unless you had made local changes.
If you are the rare flower that installs everything from source by hand, the upgrade guides will usually tell you to check for new or changed config files and make sure to add them.
There was a problem hiding this comment.
😆 Ok, I suppose I can just remove this section, then?
There was a problem hiding this comment.
fixed (didn't remove section but reworded)
7738859 to
fdf7c42
Compare
fdf7c42 to
8a28bd6
Compare
|
Have gone through Testing the migration steps outlined in this PR, and everything works as expected; marking this PR as ready. |
8a28bd6 to
417f8ce
Compare
417f8ce to
3174831
Compare
|
The second-last force-push was me just adding |
3174831 to
c55455c
Compare
c55455c to
7fbd453
Compare
|



Scope and purpose
Adds documentation to #3633
This pull request
Testing the migration steps outlined in this PR
This step-by-step assumes you're running containerized NAV and that you're fine with the Graphite/Carbon timeseries database being altered.
Fill your Graphite/Carbon timeseries database with deprecated NAV 5.14 style DHCP paths.
1.1. Copy this script to somewhere on your machine, e.g.
~/fill-graphite.bash. (It will fill Graphite with NAV 5.14 style DHCP paths.)1.2. Run the script above inside your Graphite container, e.g.
Make sure you're on the same branch as Add functionality to graph DHCP stats on each VLAN page and Prefix page in NAV #3633.
In the NAV web UI, create the prefix
192.0.2.0/24in seeddb and visit its page. Make sure there's no DHCP graphs there yet.Do the migration steps outlined in this PR, i.e.
4.1. Copy this script to somewhere on your machine e.g.
~/migrate-graphite.bash4.2. Run the script above inside your Graphite container, e.g.
In the NAV web UI, reload the page for prefix
192.0.2.0/24. Now it should be DHCP graphs displayed there.Contributor Checklist
Added a changelog fragment for towncrierAdded/amended tests for new/changed codeLinted/formatted the code with ruff, easiest by using pre-commit<major>.<minor>.x). For a new feature or other additions, it should be based onmaster.If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be doneIf this results in changes in the UI: Added screenshots of the before and afterIf this adds a new Python source code file: Added the boilerplate header to that file