Bulk Modifications SQL Errors

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Bulk Modifications SQL Errors

Post by BanditBBS »

I just tried to add a contact group to a list of services and received the following errors when trying to save.

Code: Select all

SQL: SQL Error [nagiosql] : Duplicate entry '242-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '251-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '248-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '249-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '252-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '247-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '244-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '246-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '250-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '245-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '231-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '240-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '237-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '238-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '241-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '236-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '233-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '235-3' for key 'PRIMARY' SQL: SQL Error [nagiosql] : Duplicate entry '239-3' for key 'PRIMARY'
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Bulk Modifications SQL Errors

Post by BanditBBS »

What it looks like is half the services already had that contact group assigned while the other half didn't. It did add it to the half that didn't and I applied configuration and it is working fine.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Bulk Modifications SQL Errors

Post by scottwilkerson »

This may be in the underlying NagiosQL code, it should probably be changed so the INSERT has a ON DUPLICATE KEY UPDATE value...
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Bulk Modifications SQL Errors

Post by BanditBBS »

I would agree :)

Let me guess, want me to fill out a bug report?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Bulk Modifications SQL Errors

Post by mguthrie »

I'll save you the time, I got it on the TODO for the next revision. Thanks for the report!
Locked