Run a task on a seperate host in baseline

Hello everyone,

Basically, I have a baseline with many components and am running it on a set of hosts for patching. After patching is complete, I would like to run a task on a separate host that will never be a part of the list of hosts, because I don’t want to run the baseline against that separate host. Does anyone know what I can do? Thank you in advance.

I would recommend, you should look into server automation or run the task separately once baseline execution is completed.

Another, more complicated and advanced method is to create a task that will execute an API post in the background; it can be built on the fly using a pre-defined XML feed and retrieve the target feed from a text or CSV file.

2 Likes

Yeah, I’ve been running the task separately from the baseline so far, but it would be nice to automate it somehow to run it sequentially (every time I run the baseline). I tried creating an automation plan but haven’t been able to figure it out yet.

If there is no easier way to implement it, I’ll probably continue working on the automation plan. Thanks Vijay.

what is the usecase? why does something run on another endpoint that isn’t part of the baseline targets?

Server Automation is basically meant for this, but if the needs are very minimal, then there might be something in-between that could work.

I don’t know that I’d recommend it, but technically you could write something that polls the REST API for status continuously and then fires off the task you want to run once everything succeeds.

That isn’t exactly what this does, but it is kind of a related concept: besapi/examples/stop_open_completed_actions.py at master · jgstew/besapi · GitHub

It checks to see if actions meet a certain criteria, and if so, it stops them. In your case you’d be looking for an action to meet your criteria, plus checking if the action you want to create in response DOES NOT exist yet, and then if both criteria are met, then create the follow up action.

Anything is possible if you want to go deep on the custom REST API automation path, but again, server automation is the right answer for what you are asking, because it is exactly what it is designed for.

1 Like

Essentially, the goal is to run a script that’s located on that endpoint. That script can’t run anywhere else because it requires files that are located on that system. It would be ideal to have it run right after the baseline (or inside the baseline as the last component) but in agreeance, it looks like server automation is the best option. Granted, a cronjob could’ve worked if the patching schedule was consistent every month, which it isn’t.

Creating a script that works with the REST API could also be useful, but I feel is too over the top for the task at hand, at least for now. I appreciate the info. about using the besapi though, could definitely be useful for a future task. Thanks James.

1 Like

That does seem like something that might be possible to roll into a fixlet that could run anywhere, rather than only on that system. That said if it can only be run a single time after all baselines are finished, then server automation is still probably the best place for it.

I still feel like I’m lacking enough context to know what to do more specifically.

Sure, I can give better context:

The script sends out an email that notifies our team of the status of resource groups relevant to the hosts that were patched, and the host that it runs on is a master server (so it shouldn’t ever be patched by BigFix). And we run all of our scripts on that server. For the patching process, we use the baseline to patch our systems a couple of times a month and what I’m trying to implement now is the automation of the script that sends the email notification of the resource groups. That should be sent out after the baseline completes every time.

1 Like

I think there is a BigFix notification service thing that I haven’t really used that can … do something like that.

There is also the ability to have Web Reports send out emails.

Not sure either of those really meet exactly what you are looking for, but there are definitely related things.

1 Like

yeah I don’t think that will work for this task specifically because I also have to run some commands on AIX machines to retrieve their cluster status…

but I appreciate the info., could also make use of this for a task or project in the future. Thanks again James.