Please help me clear Pending Deployments on my Activity log

Hi all,
I’ve been trying to learn Icinga2 for a while now as I inherited this configuration from a previous member of employment and I find it really amazing. However I tried to make a few changes. i.e. I tried to remove the QNAP CPU checks as our QNAPS are constantly busy and i constantly get warnings. Unfortunately I think I did something wrong, as when I try to deploy I get the following error:
Undefined offset: 1 (TemplateTree.php:186)
So I figured ok, maybe lets just click on Restore former object hoping that it would fix whatever mistake I made. However when I click that, it then comes up with the following error:

    • Storing icinga_service_set[{“host_id”:“33”,“object_name”:“QNAP Checks”}] failed: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘QNAP Checks-33’ for key ‘object_key’, query was: UPDATE icinga_service_set SET object_type = ?, description = ?, host_id = ? WHERE (id = 6) {array ( ‘id’ => ‘6’, ‘host_id’ => ‘33’, ‘object_name’ => ‘QNAP Checks’, ‘object_type’ => ‘object’, ‘description’ => NULL, ‘assign_filter’ => NULL, )} (DbObject.php:814)

I don’t understand what’s going on. IcingaWeb2 is still working well, the QNAP CPU checks are still happening, it’s just the activity log has these pending deployments and I have no idea what to do to get rid of them, and I don’t think I can make any other deployments until this is resolved.

Please can somebody advise me on how I can fix this.
I’ve made deployments before without any of these errors occurring, I just don’t know where or how I went wrong and how to rectify this.

Hey! First off, for readability, we prefer that posts are formatted according to these guidelines:

With a pending deployment, it sounds like you are doing this in Icinga Director, is that right?

From the activity log, you should just be able to click “Deploy X pending changes” as shown in the below screenshot:

This screen is accessed from the Menu options:
Icinga Director > Activity Log

Under Icinga Director > Automation > Jobs you can configure a config deploy as well. It will automatically kick off deployments at a set interval (if there are changes).

Our environment has 10s-100s of automated host/service changes daily. If you have any “Import Sources” or “Sync Rules” you can also configure these to happen auto-magically as well.

Hi Ben, apologies for not following the correct formatting.
And yes I did click on the Deploy xx pending changes. That is when I receive the message in my initial post… “Undefined offset: 1 (TemplateTree.php:186)”
I don’t understand why that came up, normally I make changes and and then go to the Activity Log and click on Deploy and it all goes well, this time I removed the QNAP Service Template (by mistake) instead of disabling the QNAP CPU Check command. And now this is where I am, stuck with deployments that will not go through. And I cannot revert/restore object due to the error that comes up as stipulated in my original post.

Sounds like something may have borked (or another dependency for the service is missing).

You can use the director to revert back to a previous deployment as well:

Icinga Director > Deployments > Select the deployment that you want to go back to from the list > Config > “Redeploy now”


If that doesn’t work, I’m out of ideas :frowning:

Edit to add:
Your “Last known good deployment” would ideally be the one before you started making any changes.

That didn’t work. It deploys, however the pending deployments are still there in queue unable to be removed.

Thanks for trying.

1 Like

thanks for the awesome information.

1 Like