Hey there (newbie incomming :)),
I'm trying to setup an Insight automation rule (for testing purposes), which is supposed to run every time a specific attribute is updated by a specific user but I'm struggeling getting my head around the Insights Query Language especially using placeholders (even after reading through the docs).
I'm having an objecttype, which is called component, which contains a mac-address.
I also have a SCCM Integration which is supposed to overwrite the mac-addresses of every component overnight using a "System User" to update the mac-address components, which makes the change-performer visible in the history (/activity) of the object (This works works as espected).
So now the idea is to run an automation, which gets triggered by an object-update and creates an issue IF the Objectype="component" AND (here my IQL capabilities come to an end) the changed attribute of the objecttype is called "mac-address" AND the user who submitted the change is called "System User".
--> following this idea, I should be able to filter the change, which happened on the component, out of the object history (/activity) events (pseudo-code):
IF:
component.activity.type = "changed value" AND component.activity.attribute = "mac-address" AND component.activity.performer="System User"
Do you have any ideas on how I can pull this information out of the database?
Thanks in advance
Unfortunately I don't believe there is a way to make IQL search the history. The only way I can think of accomplishing what you want is to create an automation that triggers on object update when the objectType check for your object type matches then having an action of Groovy script.
The script would have to do the rest of the testing by retrieving and analyzing the ObjectHistoryBean objects associated with your object to see if the right value was changed by the right user per your example. The Insight JavaDoc has the reference documentation for the Java APIs that Insight provides. They have a number of Groovy examples in their documentation, though I haven't seen one that references the object history nor have I specifically written anything that uses the object history.
This one will likely take a fair bit of Insight scripting to pull off.
Hi Craig,
thanks for the answer. I already expected something like this, since I've seen a feature request for another but similar topic, yesterday, about analysing the actions in the history.
Thanks anyway :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Marcus,
Were you able to write a script here? If yes, could you please share it? I am also looking for a trigger on particular attribute update. Or any specific example/thread which can be referenced
Thanks,
-Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Amit,
I'm sorry but no, because the whole thing of using JSD and Insight as a CMDB host was just a experiment, I didn't put any more efforts into it.
-Marcus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's ok. Thanks for your reply Marcus.
If I am able to solve I will post to community :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.