Announce Maintenance Tool Not Working

Support forums for the Habitat Automate plugin
Post Reply
ChallengerJ
Posts: 3
Joined: Tue Mar 15, 2022 2:58 pm
2

Announce Maintenance Tool Not Working

Post by ChallengerJ »

Hello,

I am attempting to use the Habitat Announce Maintenance tool to announce patching to users but it doesn't seem to be working. When I try to set a certain time and save, it reverts back to 12PM as the selected. Also, when I set a group and save it still doesn't send out notifications even at 12PM. Any help would be greatly appreciated.

Thanks!

User avatar
Cubert
Posts: 2450
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Announce Maintenance Tool Not Working

Post by Cubert »

Sure no problem,

Just to get the most overlooked out of the way, did you happen to see viewtopic.php?t=5668

Next is this a new install of Habitat?

Reason-> We have seen in the past with select customers where Automate gets cache happy and retains a view in Control center even after the data changed in database. Typically dealing with on / off buttons and config settings.

Automate server reboot resolves this issue. If the install is older (weeks), then this is typically not a issue.


So for us to test this is not the case you can open the SQL analyzer and execute the following after changing data to see if that data actually changed.

Code: Select all

SELECT * FROM plugin_p4a_habitat_announce_maintenance

Also look for

Code: Select all

SELECT `Value` FROM plugin_p4a_habitat_properties WHERE `Name`= 'Announce_PatchGroup'

Code: Select all

SELECT `Value` FROM plugin_p4a_habitat_properties WHERE `Name`= 'Announce_Same_Day'

Make changes and then run the queries above to see if the data saved correctly.

Post back your findings here..

ChallengerJ
Posts: 3
Joined: Tue Mar 15, 2022 2:58 pm
2

Re: Announce Maintenance Tool Not Working

Post by ChallengerJ »

Thank you so much for your reply,

I did see that particular post but was unable to fix the issue based on that.

This is not a new install of Habitat and we have had Habitat for quite a while.

I tested some data changes and running the SQL queries to test. Below are the results:
Screenshot_1.png
Screenshot_1.png (28.81 KiB) Viewed 1559 times
Screenshot_2.png
Screenshot_2.png (27.99 KiB) Viewed 1559 times
Screenshot_3.png
Screenshot_3.png (2.81 KiB) Viewed 1559 times
It appears that even in the database the time window is not changing. Do you have any ideas what might be causing this?

User avatar
Cubert
Posts: 2450
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Announce Maintenance Tool Not Working

Post by Cubert »

That's odd, I am testing mine here and I am updating as expected. Let me reform the statement a little to see if maybe your not interpreting the field correctly. I'll put this out in 1.0.1.22 in the next couple of days.
Also test for me that your setting the same-day and patch group setting in habitat properties

Code: Select all

SELECT * FROM plugin_p4a_habitat_properties;
This should give a true or false for Announce_Same_Day and the Patch Group Name for the Announce_PatcGroup field




It will also have the URL fix in it for POSH maintenance.

User avatar
Cubert
Posts: 2450
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Announce Maintenance Tool Not Working

Post by Cubert »

I have made a few tweaks to this function that will be going out in build 1.0.1.22


To validate that your have agents correctly assigned to patching groups and are visible, online and able to take message, you can execute in SQLYog the following query. Any agentID's show in this query will be sent the maintenance message.

Change {0} to the day of the week the group is set to run patches (1-7)

Change {1} to the name of the patch group you are going to message

Code: Select all

SELECT a.ComputerID, b.day, b.starttime, b.CustomAction  FROM v_dv_patchgroupassignment a LEFT JOIN installsoftwarepolicies b on a.PatchingGroupInstallPolicy = b.Name WHERE PatchingGroupName = '{1}'  and b.day = '{0}' and ComputerID IN (Select a.ComputerID FROM computers a WHERE a.LastContact > date_add(now(),interval -5 minute) and a.OS LIKE '%Windows%' and a.OS NOT LIKE '%Server%' and a.ClientID IN (SELECT ID FROM extrafielddata WHERE ExtraFieldID = (SELECT ID FROM extrafield WHERE `Name` = 'Enable Habitat Announce Maintenance') and `Value` = '1'))

Should get a bunch of computerID's like so..

Screenshot.jpg
Screenshot.jpg (7.06 KiB) Viewed 1531 times

These will be the ID's that the messaging script will execute against when the correct time and date arrive. If the computer IDs are not in this list then verify they belong to group by viewing group, verify they are online and verify that the client's extra data field is set correctly for Announce Maintenance (Enable Habitat Announce Maintenance), see image below.


Screenshot.jpg
Screenshot.jpg (63.05 KiB) Viewed 1531 times

ChallengerJ
Posts: 3
Joined: Tue Mar 15, 2022 2:58 pm
2

Re: Announce Maintenance Tool Not Working

Post by ChallengerJ »

Hi, this is what I'm getting when I run the first SQL query:
Screenshot_4.png
Screenshot_4.png (18.97 KiB) Viewed 1487 times
This is what I get when I run the next SQL query with the appropriate patch group and day:
Screenshot_5.png
Screenshot_5.png (2.26 KiB) Viewed 1487 times

User avatar
Cubert
Posts: 2450
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Announce Maintenance Tool Not Working

Post by Cubert »

So from the last query it appears that you have 2 online agents set for the 3 day of the week and the notice should go out on the 11th hour (11AM)

The next step is to see if at that time a script is scheduled on that agent (Announce Maintenance) and what if any was its outputs?

We should also look at the Habitat logs for the same time frame to see if Announce Maintenance automation ran at that time to schedule script.


Is your data now saving correctly, the very first problem you reported?


Also did you get 1.0.01.22 build updated? Habitat should have updated automatically if you have that automation service running.

Post Reply

Return to “Habitat”