Timed / Scheduled Analysis

A few times now I have come across situations where it would be handy to trigger an analysis at a specific time frame instead of the intervals that BigFix provides. Here are a few examples:

  1. A change in software (from an external system, not within BigFix) is scheduled for 4am. The team wants an analysis with the updated data by the time the change should be finished, e.g. 5am.
  2. A scheduled task happens daily at 5:30am and may update data that an analysis reports on. So I only need a “daily” analysis, but I would need the daily analysis to evaluate at 6am - after the task has finished and before people get to work and start using this data.

I could get around this by making these analyses run “every report” so I get the data asap, but that’s definitely overkill for both of these examples. Especially for the second example, once I run the analysis I don’t need it refreshed until the next day.

I haven’t been using BigFix for that long - is there something I’m missing?

Thanks in advance.

You don’t really have any good options here.

That being said – as long as the analyses don’t take more than a couple seconds each to run I’d just run them every report.

If the analyses are heavy (take more than a couple seconds) then you might want to change to every hour or something.

There is a potential solution to this.

Option 1

You can set the analysis property to report once every 6 hours and it will be more likely to be fresh. Once every hour would help ensure this even more so. I would not recommend using every report in most cases, even once every 5 minutes would be better.

Option 2

Another option is to use a task to tell the client to send a full report on a schedule. You could set the property to report once a day, or even once every 30 days, but then force the client to update it.

Send a task that only runs at 6am, or only runs after the other tasks have completed, or put it at the end of the set of tasks that will make all of the changes.

This is the actionscript for the task:

notify client ForceRefresh

The main problem with this option is that it will force the client to update ALL properties regardless of their report interval. This means if you have a lot of heavy properties, it will have to go through them all. It also means that all of the clients that get this will be sending a significant amount of data to the relays and root, which could be a problem if your root server can’t ingest the reports fast enough. If you send this to all clients and you had a lot of them and the root server was slow enough, it is possible that this could back up your reporting for days in the worst case.

Option 3

I just thought of this. Not sure it is a great idea, but it might work.

Use the REST API to automatically switch the analysis properties you care about from reporting once every 6 hours to once every 5 min at 5am and have it switch back at 7am.

This would require that the clients get the UDP notifications from their relay or have command polling enabled to ensure this change propagated quickly enough. This is extra true if the clients are sleeping during the night and are being awoken to run a bunch of stuff and then go back to sleep. If a client misses a UDP notification while sleeping, then wakes, it won’t know about it and it won’t check in to see what it missed unless command polling is enabled. So in the worst case, the clients wouldn’t know about the change in reporting interval for the analysis properties.

Option 4

Get IBM to create an actionscript command to force a client to update a specific property or analysis instead of ALL properties.

Something like:

notify client Refresh "Name_Of_Property"

This is definitely RFE worthy: How to ask for IBM product help: PMRs, RFEs, and more

1 Like

One common method you might try is to have an Action that creates a text file or client setting, and an Analysis that reads the value of the file or setting. You could schedule the Action to execute when you expect the changes to occur, and the Analysis retrieve the results more frequently.

Another ugly hack you could use is to edit the Analysis (even if you don’t actually change the content) when you want to refresh that one Analysis. The client sees the Analysis as updated, and evaluates its results as if it were new content.

1 Like

Thanks everyone. Great ideas and tips. For now I guess I will stick with simply running the analysis more frequently. It’s the most painless and straightforward option. I mostly wanted to make sure I wasn’t missing some obvious method that everyone was using. I agree with James, this sounds like a good RFE so I’ll look into that.

1 Like

If you file an RFE, link it here so we can comment on / vote on / watch it.

Thanks James. RFE is here: http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=78016

1 Like

I like the detail you provided in the RFE, thanks!