nagios_externalcommands id limit

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
odino2016
Posts: 9
Joined: Mon Jun 20, 2016 3:53 am

nagios_externalcommands id limit

Post by odino2016 »

Nagios database has a table nagios_externalcommands (which stores received external command of course) which has an auto-increment INT id field: externalcommand_id
Its limit is 2147483647 (because it is a signed INT).
We are using a lot of passive checks sending external commands to set passive checks status and reached the maximum id value.
Thus we are getting the following errors:
Error: mysql_query() failed for 'INSERT INTO nagios_externalcommands ...' and
mysql_error: 'Duplicate entry '2147483647' for key 'PRIMARY'
We plan to resolve this problem issuing the following command (not done yet in production environment but tested in development):
alter table nagios_externalcommands modify column externalcommand_id bigint NOT NULL AUTO_INCREMENT;

Please note that due to a short retention window there is no problem with the size of the table (older records have been deleted).

We hope that there is no other table with such low limited ID sizing with respect to the number of processes records.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: nagios_externalcommands id limit

Post by scottwilkerson »

This is a perfectly acceptable solution and we have recommended it to others.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked