Cisco IP SLA issues

Hi,
some of my cisco devices with IP SLA are alerting a down state, There is a SLA ID’s which were never
created by myself and exist in the cisco config, so the slas.opstatus is triggering an alert.
In the Log-File i see the following:

Error in slas module. SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘1207-11’ for key ‘slas_device_
id_sla_nr_unique’ (SQL: insert into slas (deleted, sla_nr, owner, tag, rtt_type, rtt, status, opstatus, device_id) values (0, 11.3, , , , ?, 0, 2, 1207))
#0 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(652): Illuminate\Database\Connection->runQ
ueryCallback()
#1 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(486): Illuminate\Database\Connection->run(
)
#2 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(438): Illuminate\Database\Connection->stat
ement()
#3 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\Database\C
onnection->insert()
#4 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2997): Illuminate\Database\Query\Proces
sors\Processor->processInsertGetId()
#5 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1650): Illuminate\Database\Query\Bui
lder->insertGetId()
#6 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1124): Illuminate\Database\Eloquent\Bu
ilder->__call()
#7 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1089): Illuminate\Database\Eloquent\Mo
del->insertAndSetId()
#8 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(930): Illuminate\Database\Eloquent\Mod
el->performInsert()
#9 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php(267): Illuminate\Data
base\Eloquent\Model->save()
#10 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php(279): Illuminate\Dat
abase\Eloquent\Relations\HasOneOrMany->save()
#11 /opt/librenms/LibreNMS/DB/SyncsModels.php(55): Illuminate\Database\Eloquent\Relations\HasOneOrMany->saveMany()
#12 /opt/librenms/LibreNMS/Modules/Slas.php(46): LibreNMS\Modules\Slas->syncModels()
#13 /opt/librenms/includes/discovery/slas.inc.php(8): LibreNMS\Modules\Slas->discover()
#14 /opt/librenms/includes/discovery/functions.inc.php(164): include(’/opt/librenms/i…’)
#15 /opt/librenms/discovery.php(117): discover_device()
#16 {main}


Component Version
LibreNMS 21.7.0-1-g3d0c1e63b
DB Schema 2021_06_07_123600_create_sessions_table (211)
PHP 7.4.3
Python 3.8.10
MySQL 10.3.29-MariaDB-0ubuntu0.20.04.1
RRDTool 1.7.2

It seems the PR: Fix possible null error in SLA modules #13046
is causing this issue.
When I reverted the changes on my Test-LNMS machine , it seems to work again and no “death,” sla id appear again and everything works fine.
On discord there was another guy who reported this issue as well.
I know this fix should solve this “null error” thing, but it seems there came another one into it.

ciao

here is the test-data as metnioned on discord:
./scripts/collect-snmp-data.php -m slas -v broke -h


1.3.6.1.2.1.1.1.0|4x|436973636f20494f5320536f6674776172652c20433335363020536f667477617265202843333536302d495053455256
494345534b392d4d292c2056657273696f6e2031352e30283229534531312c2052454c4541534520534f4654574152452028666333290a5465636
86e6963616c20537570706f72743a20687474703a2f2f7777772e636973636f2e636f6d2f74656368737570706f72740d0a436f70797269676874
2028632920313938362d3230313720627920436973636f2053797374656d732c20496e632e0d0a436f6d70696c6564205361742031392d4175672
d31372030393a32312062792070726f645f72656c5f7465616d
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.9.1.615
1.3.6.1.2.1.1.3.0|67|2129157527
1.3.6.1.2.1.1.5.0|4|
1.3.6.1.4.1.9.9.42.1.2.1.1.2.10|4|
1.3.6.1.4.1.9.9.42.1.2.1.1.3.10|4|
1.3.6.1.4.1.9.9.42.1.2.1.1.4.10|2|1
1.3.6.1.4.1.9.9.42.1.2.1.1.5.10|2|1000
1.3.6.1.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.4.1.9.9.42.1.2.8.1.2.10|2|15
1.3.6.1.4.1.9.9.42.1.2.8.1.3.10|2|1
1.3.6.1.4.1.9.9.42.1.2.8.1.4.10|2|1
1.3.6.1.4.1.9.9.42.1.2.9.1.1.10|67|0
1.3.6.1.4.1.9.9.42.1.2.9.1.2.10|4|
1.3.6.1.4.1.9.9.42.1.2.9.1.3.10|67|0
1.3.6.1.4.1.9.9.42.1.2.9.1.4.10|66|720
1.3.6.1.4.1.9.9.42.1.2.9.1.5.10|2|2
1.3.6.1.4.1.9.9.42.1.2.9.1.6.10|2|2
1.3.6.1.4.1.9.9.42.1.2.9.1.7.10|2|2
1.3.6.1.4.1.9.9.42.1.2.9.1.8.10|2|10645747
1.3.6.1.4.1.9.9.42.1.2.9.1.9.10|2|2147483647
1.3.6.1.4.1.9.9.42.1.2.9.1.10.10|2|6
1.3.6.1.4.1.9.9.42.1.2.9.1.11.10|2|2
1.3.6.1.4.1.9.9.42.1.2.10.1.1.10|66|16
1.3.6.1.4.1.9.9.42.1.2.10.1.2.10|2|1
1.3.6.1.4.1.9.9.42.1.2.10.1.3.10|2|0
1.3.6.1.4.1.9.9.42.1.2.10.1.4.10|4|
1.3.6.1.4.1.9.9.42.1.2.10.1.5.10|67|2129157477
1.3.6.1.4.1.9.9.42.1.2.10.1.6.10|4|
1.3.6.1.6.3.10.2.1.3.0|2|21291716


A screenshot what it looks lke:

I had this exact same issue on IOS-XE/IOS-XR. Basically every time the device is rediscovered the Null SLAs return. Even after deleting the SLAs in the SQL database and removing the RRD files.

Hi,
a fix has been released by murrant today. Works great now. Thank you @murrant.

Issue was extra data from the device… Double fixed it. Updated the MIB and made the code ignore bad entries.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.