mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
Rewrite the test data capture section (#12046)
This commit is contained in:
parent
881922fa2f
commit
2a795c069b
@ -21,30 +21,35 @@ make sure it is modified in a consistent manner.
|
||||
|
||||
## Capturing test data
|
||||
|
||||
???+ warning "If test data already exists"
|
||||
|
||||
If test data already exists, but is for a different device/configuration with the same OS.
|
||||
Then you should use the `--variant (-v)` option to
|
||||
specify a different variant of the OS,
|
||||
this will be tested completely separate from other variants.
|
||||
If there is only one variant, please do not specify one.
|
||||
|
||||
### 1. Collect SNMP data
|
||||
|
||||
`./scripts/collect-snmp-data.php` is provided to make it easy to
|
||||
collect data for tests. Running collect-snmp-data.php with the
|
||||
--hostname (-h) allows you to capture all data used to discover and
|
||||
`--hostname (-h)` allows you to capture all data used to discover and
|
||||
poll a device already added to LibreNMS. Make sure to re-run the
|
||||
script if you add additional support. Check the command-line help for
|
||||
more options.
|
||||
|
||||
|
||||
### 2. Save test data
|
||||
|
||||
After you have collected snmp data, run `./scripts/save-test-data.php`
|
||||
with the --os (-o) option to dump the post discovery and post poll
|
||||
with the `--os (-o)` option to dump the post discovery and post poll
|
||||
database entries to json files. This step requires snmpsim, if you are
|
||||
having issues, the maintainers may help you generate it from the
|
||||
snmprec you created in the previous step.
|
||||
|
||||
Generally, you will only need to capture data once. After you have
|
||||
the data you need in the snmprec file, you can just use
|
||||
save-test-data.php to update the database dump (json) after that.
|
||||
Generally, you will only need to collect data once.
|
||||
After you have the data you need in the snmprec file, you can just use save-test-data.php to update the database dump (json) after that.
|
||||
|
||||
### OS Variants
|
||||
|
||||
If test data already exists, but is for a different
|
||||
device/configuration then you should use the --variant (-v) option to
|
||||
specify a different variant of the os, this will be tested completely
|
||||
separate from other variants. If there is only one variant, please do
|
||||
not specify one.
|
||||
|
||||
## Running tests
|
||||
|
||||
|
@ -16,6 +16,7 @@ markdown_extensions:
|
||||
- pymdownx.tilde
|
||||
- pymdownx.superfences
|
||||
- pymdownx.tabbed
|
||||
- pymdownx.details
|
||||
extra_css:
|
||||
- https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css
|
||||
- librenms.css
|
||||
|
Loading…
Reference in New Issue
Block a user