Sensors - Allow changing RRD type in YAML and PHP sensor discovery#14208
Sensors - Allow changing RRD type in YAML and PHP sensor discovery#14208murrant merged 99 commits intolibrenms:masterfrom
Conversation
|
Please add test data so we can ensure your change is not broken in the future. |
|
Seems reasonable, do any changes need to be made to the graphs? |
Not necessarilly. May be some text/graphical changes to add "per second" to the unit, etc. Will see how it goes with tests. |
This comment was marked as outdated.
This comment was marked as outdated.
8dd82fa to
c52d274
Compare
aa62dc7 to
96d27ac
Compare
|
@murrant Whatever I do, save-test-data cannot provide me 100% of files that would pass correctly the tests. Even on my own server, with same DB and same settings, they do not succeed. Would you have any suggestions ? |
b6c3031 to
e9bfaa3
Compare
|
@librenms/reviewers : tried my best with tests but still fighting to get it right : save-test-data runs as good as it can, and provides a result that makes sense. |
|
Sorry this is a nightmare to update :/ |
bb9b284 to
144c8e5
Compare
|
Hi @murrant @Jellyfrog Do you have any tips ? Thx |
|
It except sensors but doesn't find any for that device. |
But looking at the capture, you see that the data is actually found :) That's my problem. It finds it but complains it doesn't ... |
|
Hi @librenms/reviewers |
|
Might miss something, but when running ./scripts/save-test-data.php -o apc -v sua750i, it breaks on: Error polling sensors module for 127.1.6.1. LibreNMS\Exceptions\InvalidRrdTypeException: is not valid, must be: GAUGE | DERIVE | COUNTER | ABSOLUTE | DCOUNTER | DDERIVE in librenms/LibreNMS/RRD/RrdDefinition.php:122 because the $sensor doesnt have a rrd_type set: |
did you run the migrations ? I would be the DB is not in the correct state. |
|
Oh. No :) it's probably that then. I'll recheck tomorrow |
|
when I do test generation, I usually run "lnms dev:check -o myOsName" at least up to the "refreshing database ... done". That way I am sure the DB is empty and clean. |


Replaces #13854
A new DB column in sensors stores the RRD type (which defaults to GAUGE as it is currently). This is a draft currently. Will update this desc as it reaches a "runnable" status.
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 5926After 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.