I have the same issue, hoping someone has a solution. The cisco-sla module works fine in discovery when a new SLA is added, but fails on both an update and delete operation. The SQL code in the error works fine if entered directly into MySQL – in fact, when using this same SQL statement to directly change the value of the "deleted’ field – the update is made, and then is not be attempted on the next discovery run. Here’s the snippet of my debug:
SQLSTATE[HY093]: Invalid parameter number: mixed named and positional parameters (SQL: UPDATE slas
set device_id
=19,sla_nr
=25,owner
=,tag
=10.255.255.1,rtt_type
=echo,status
=1,opstatus
=0,deleted
=0 WHERE sla_id
= 1) (SQL: UPDATE slas
set device_id
=19,sla_nr
=25,owner
=,tag
=10.255.255.1,rtt_type
=echo,status
=1,opstatus
=0,deleted
=0 WHERE sla_id
= 1)
#0 /opt/librenms/includes/discovery/cisco-sla.inc.php(80): dbUpdate(Array, ‘slas’, ’sla_id
= :sla…’, Array)
#1 /opt/librenms/includes/discovery/functions.inc.php(179): include(’/opt/librenms/i…’)
#2 /opt/librenms/discovery.php(120): discover_device(Array, true)
#3 {main}
.SQLSTATE[HY093]: Invalid parameter number: mixed named and positional parameters (SQL: UPDATE slas
set deleted
=1 WHERE sla_id
= 2) (SQL: UPDATE slas
set deleted
=1 WHERE sla_id
= 2)
#0 /opt/librenms/includes/discovery/cisco-sla.inc.php(87): dbUpdate(Array, ‘slas’, ’sla_id
= :sla…’, Array)
#1 /opt/librenms/includes/discovery/functions.inc.php(179): include(’/opt/librenms/i…’)
#2 /opt/librenms/discovery.php(120): discover_device(Array, true)
#3 {main}
Note, the first section’s error is an update to a existing SLA, and the second is a “delete” to a removed SLA from the Cisco device.
This issue is also duplicate of a post from December (IP SLA SQL Error) – which also remains unresolved.
My current workaround is to manually edit the SLAS table from CLI.