Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Add company name to CI's during or after the discovery

SmithD281019
Tera Contributor

Morning,

I am looking for help in adding our customer's company names to each CI as it is being discovered. This is very important to how our alerting works.

I don't think the best practice is to have multiple Business Rules to run after each discovery, as it is not very dynamic and not very scalable. I don't particularly want to add or create a new pattern design for the same reason. 

Is there a way to add the company name as a property or value to the customer's MID server so each CI picks it up from there? 

Any help on the matter would be very much appreciated. 

Thanks,
Dan

1 ACCEPTED SOLUTION

robertgeen
Tera Guru

Dan,

So I actually just implemented this for a client I am working for. Here's how I did it:

- We had to add a reference field at the schedule level that links to the company table.

- We then had to add a pre-post script which modifies the payload and references the schedule that it was running as and adds the company to it.

- This will only work for patterns. For the old probes/sensors you will need to find a different mechanism to do it but honestly I think you only really care about hardware and possibly application CIs so you could add a company mapping from the hardware on the process classifiers as well.

I hope this helps you out!

View solution in original post

7 REPLIES 7

robertgeen
Tera Guru

Dan,

So I actually just implemented this for a client I am working for. Here's how I did it:

- We had to add a reference field at the schedule level that links to the company table.

- We then had to add a pre-post script which modifies the payload and references the schedule that it was running as and adds the company to it.

- This will only work for patterns. For the old probes/sensors you will need to find a different mechanism to do it but honestly I think you only really care about hardware and possibly application CIs so you could add a company mapping from the hardware on the process classifiers as well.

I hope this helps you out!

Thanks Robert, I think this is what I am after. 

 

May I ask what the line of script you used to retrieve/reference the schedule that activated the pattern. 

 

Cheers,

Dan

They pass in a few values into it that can be used. g_probe.getCorrelator() is probably the one you want as it should have the ID of the discovery schedule which you can then look up the schedule through a glide record query with that.

If you search for that through all the pre post scripts you will see some examples. Hope this helps.