3rd Party Application Management

Support forums for the Habitat Automate plugin
User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: 3rd Party Application Management

Post by Cubert »

On a side note,

Can we get an expand remark about " it wreaked havoc with their environment."? We understand that deploying Chocolatey unwantedly and doing clean ups would be a result of enabling a client unwantedly but can you elaborate on what actual issues resulted.

We would expect to see wide scale chocolatey deployments followed by versioning and updates to the 3rd party apps in your default configs. For other MSPs who may deploy to a large client, how did this effect the environment?

This will help us to determine if there is something we can set to control and inform other MSPs to the relationship of issue.

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

Re: 3rd Party Application Management

Post by Cubert »

We have now released build 1.0.0.75, should go out to night as an auto update or you can download it now from our web portal.

dbitters
Posts: 58
Joined: Tue May 18, 2021 8:11 pm
2

Re: 3rd Party Application Management

Post by dbitters »

Cubert,
When you have time, can you take a look at the Snail Scheduler? In your screenshot, when you saved the set schedule, the green text reflected what you set. When I tried that, the green text did not change, and it still says "Client is defaulting to a daily schedule." The "Remove Current Schedule", doesn't seem to have an effect because I don't think the schedule is getting set. Do you need a snail button on the App manager main console in addition to the turtle and rabbit button to activate the snail schedule? I'm going to reboot our LT server in case the update didn't load properly, but I wanted to pass that observation along. Please see attached.
Snail.PNG
Snail.PNG (18.29 KiB) Viewed 4229 times

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

Re: 3rd Party Application Management

Post by Cubert »

Ok this may sound like a stupid question but once you clicked "OK" did the green text not change afterwards? If you close and reopen the Snail scheduler does it still say Defaulting to daily after change?


If the above leaves the setting at its default value the you maybe missing the fields needed to manage these values. Have a look at the following table in the Automate database "plugin_p4a_habitat_app_manage_clients" and see if the following columns exist ( Enable_Schedule and Schedule_Value ).

To check table run this sql query:

Code: Select all

DESCRIBE  plugin_p4a_habitat_app_manage_clients;
If this is the case the following SQL statement should resolve that.

Code: Select all

DROP PROCEDURE IF EXISTS add_schedulert_to_client; 
DELIMITER $$ 
CREATE DEFINER=CURRENT_USER PROCEDURE 
add_schedulert_to_client ( ) 
BEGIN 
DECLARE colName VARCHAR(10); 
SELECT column_name INTO colName FROM information_schema.columns WHERE table_name = 'plugin_p4a_habitat_app_manage_clients' AND column_name = 'Enable_Schedule'; IF colName is null THEN ALTER TABLE `plugin_p4a_habitat_app_manage_clients` ADD COLUMN `Enable_Schedule` VARCHAR(10) NULL AFTER `Servers`, ADD COLUMN `Schedule_Value` INT(2) NOT NULL DEFAULT 0 AFTER `Enable_Schedule`; 
END IF; 
END
$$ DELIMITER ; 
CALL add_schedulert_to_client; 
DROP PROCEDURE add_schedulert_to_client;

Then retest the table to see if it now has theses 2 new columns

dbitters
Posts: 58
Joined: Tue May 18, 2021 8:11 pm
2

Re: 3rd Party Application Management

Post by dbitters »

To confirm, clicking ok and save and then reopening has no effect and it does not change the green text.
I am assuming as you said that we are missing the fields in the table.
Unfortunately, since we have the hosted version, we don't have an easy way to view the tables or run queries or statements since we don't have access to the server or to review or modify SQL directly. I will try LT support to see if they can possibly assist us, but there is usually a week delay on those requests, so I won't have a quick answer.

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

Re: 3rd Party Application Management

Post by Cubert »

They can also just drop the table for you and then restart the DBagent and it will recreate the table as needed with accurate columns.

As a side note, Our Habitat plugin is designed for hosted RMM environments and has a SQL query tool as part of the suite of tools. It also has a SQL command executer that can drop the table for you. Anyone using HostedRMM.com will get value from Habitat.

Sorry for the plug but here is a prime example where Habitat can help a MSP. :)

dbitters
Posts: 58
Joined: Tue May 18, 2021 8:11 pm
2

Re: 3rd Party Application Management

Post by dbitters »

I actually saw some of those tools when I initially looked into Habitat and I agree about all these tools having a significant benefit. I thought, cool, the SQL tool will allow us to do things without having to do back-end scripts or having to open up tickets for support to help us.
I somewhat assumed that I needed to do some prerequisites before using the SQL query analyzer and that I had to first target the tables before running any statements.
I threw the query/statements in and this is what was returned.
SQL1.PNG
SQL1.PNG (16.03 KiB) Viewed 4201 times
SQL.PNG
SQL.PNG (19.53 KiB) Viewed 4201 times

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

Re: 3rd Party Application Management

Post by Cubert »

The add column query returns no data so should not be checked.

dbitters
Posts: 58
Joined: Tue May 18, 2021 8:11 pm
2

Re: 3rd Party Application Management

Post by dbitters »

I also ran the drop query without the box checked and it did not throw any error. However even after restarting the database agent and even disabling and reenabling the Habitat plugin, I still don't see the additional field from the first query that you mentioned. I checked the schedule just in case after everything restarted, and it's still isn't working. Any thoughts?

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

Re: 3rd Party Application Management

Post by Cubert »

Yes I should of guessed that would happen..

The query editor is running as the person logged in and you only have permissions to insert, update, delete, and read data at this level. You need to be running as the Automate Host (DBAgent) to alter or change database structure.

The good thing about Habitat is we give you that power.

If you launch the database maintenance tool from Habitats main control console it will allow you to create your own database maintenance functions that do run as the Automate host.

All you need to do is create a function then place it inside an enabled group and enable it.

But I would suggest that you create a new group first, then create a function and add that group ID to it.

Right click the groups to create a new group, Right click the functions list to create a new function.
Capture.PNG
Capture.PNG (112.69 KiB) Viewed 4159 times

Now give your function a name and description, place in the group ID and paste in to the function area:

Code: Select all

ALTER TABLE `plugin_p4a_habitat_app_manage_clients` 
ADD COLUMN `Enable_Schedule` VARCHAR(10) NULL AFTER `Servers`,
ADD COLUMN `Schedule_Value` INT(2) NOT NULL DEFAULT 0 AFTER `Enable_Schedule`


Capture1.PNG
Capture1.PNG (34.31 KiB) Viewed 4159 times

Now right click new group and new function and enable them. This will run at 12 midnight and can be disable in the morning after. The function will now run as the Automate Host and should alter table as needed. There no worries if function was allowed to stay enabled past one day, it would just fail as columns now exist so it will not cause a problem if forgot for a few days before disabling. I should extend the function control to allow one time uses and then auto disable it's self. I will look at adding in this feature for future needs.

Post Reply

Return to “Habitat”