Discovery YAML. Do not implicitly append $index (#9315)

Require it explicitly. Makes it easier to understand and matches the style of other values

Questionable YAML changes (either broken before or now broken):
secureplatform: haStatCode
ptp600: receiveModulationMode

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### 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.
This commit is contained in:
Tony Murray
2018-11-10 17:45:24 -06:00
committed by Neil Lathwood
parent 4695bc14df
commit 1d48cf7db2
101 changed files with 877 additions and 878 deletions

View File

@@ -1034,7 +1034,7 @@ function discovery_process(&$valid, $device, $sensor_type, $pre_cache)
d_echo("Final sensor value: $value\n");
if (can_skip_sensor($value, $data, $sensor_options, $raw_data[$index]) === false && is_numeric($value)) {
$oid = $data['num_oid'] . $index;
$oid = str_replace('{{ $index }}', $index, $data['num_oid']);
// process the description
$descr = dynamic_discovery_get_value('descr', $index, $data, $pre_cache);