Its been asked before (But with no solution) but has anyone worked out how to automatically associate assets to incidents. We have hooked our monitoring product into FreshService and its busy logging tickets but I feel like I’m going backward if I have to ask someone to manually associate the assets ???
I’ve checked supervisor, workflows and alert rules but can;t see an easy way to crack it. We could code it up in PShell but I’m trying to avoid that, any thoughts ?
Page 1 / 1
Hello @JonO I would try creating a workflow automator to automate that process. There a few ways to do it, but ultimately you could make an API request to the Freshservice API and associate an Asset in that fashion. You will need to find out how you can gain access to the asset ID from the ticket (whether that is a field where that idea is populated, etc) so that you can make the workflow dynamic.
Let us know if you need any further help with that. Take care.
Thanks @zachary.king this is what we concluded as well. I was hoping there would be a nice workflow way of doing it but I think as you say it will be picking out those ticket types, running a match on the ‘node’ with a problem to find an asset ID then add the association.
I’m doing it manually just to see the data and I have to say its well worth doing, you can get some reports on assets with the highest number of incidents, although I would much rather a dash which seems to be something missing from the asset side of things!
Thought I would actually put a conclusion on this one, we managed to complete it ! The workflow has a liquid filter to extract the CI name then uses the api within the workflow to make the association.
Thought I would actually put a conclusion on this one, we managed to complete it ! The workflow has a liquid filter to extract the CI name then uses the api within the workflow to make the association.
Are you using the API with in the automator?
@JonO , to be honest i do not understand why you have to do the association in a workflow. In our setup we hooked up various Alertsources to FS Alertmanagement using Custom integrations. Basic approach:
Asset name in “Resource” - field when sending JSON to Custom Alertmanager Webhook
All other relevant info for incident ticket in “additional Info” fields.
Workflow Automation:
Trigger by “Incident raised”
Condition: Incident created by Custom Integration Name
JSON Parser node to extract data from “{{ticket.primary_alert.additional_info}} → your approach using liquid filter works also but why do manual parsing using strings if JSON can be used?
Action node that stores extracted info in Incident
As long as the name of the asset/CI passed in “resource” matches the name in the CMDB, there is no need to to the association manually, FS does this for you (at least in FS enterprise)
Hope that helps. Let me know if you need more details.
@JonO , to be honest i do not understand why you have to do the association in a workflow. In our setup we hooked up various Alertsources to FS Alertmanagement using Custom integrations. Basic approach:
Asset name in “Resource” - field when sending JSON to Custom Alertmanager Webhook
All other relevant info for incident ticket in “additional Info” fields.
Workflow Automation:
Trigger by “Incident raised”
Condition: Incident created by Custom Integration Name
JSON Parser node to extract data from “{{ticket.primary_alert.additional_info}} → your approach using liquid filter works also but why do manual parsing using strings if JSON can be used?
Action node that stores extracted info in Incident
As long as the name of the asset/CI passed in “resource” matches the name in the CMDB, there is no need to to the association manually, FS does this for you (at least in FS enterprise)
Hope that helps. Let me know if you need more details.
This is a good way but there is not a option to associate an asset from this automator unfortunately.
Our setup is we have a server collecting information from workstations, when an event is logged that meets the criteria a webhook is sent to Fresh service with the info. In the info passed to FS the serial number of the asset is sent. How can I automate that to associate it to the ticket that is created from the alert? I have followed your JSON parse node but the action node following has no ability to associate the asset.
@KrisC I think what @Ralf.Wenzel wants to point out is that you don’t have to use a workflow automator to associate an asset to your incident. Just ensure that you are passing the name of the asset as the “Resource” value in alert payload. Freshservice will automatically associate the asset to the incident which the alert creates
@KrisC I think what @Ralf.Wenzel wants to point out is that you don’t have to use a workflow automator to associate an asset to your incident. Just ensure that you are passing the name of the asset as the “Resource” value in alert payload. Freshservice will automatically associate the asset to the incident which the alert creates
Correct, this is working now that we updated the json paylod to include the name in the resource field.
How can I use the JSON parse if the ticket description is not in JSON format?
Here is an example: In our inventory, the freshservice Asset Tag matches the below System Name
~~~ Hi Jason,
We attempted to patch ABC123DEF5678 on 2024-08-19T13:18:52+0000, but ran into some problems and were unable to complete the operation. Here is a summary of what happened:
Patch Time: 2024-08-19T13:18:52+0000
Organization ID: 12345
System Name: ABC123DEF5678
System OS: 10 Enterprise
IP Address: 1.2.3.4
Patches: "Windows 11, version 23H2"
Failure: Failed to apply patches (...)
If you need assistance using the product or would like to discuss how to get the most out of Automox, you can reach the Automox team by email at support@automox.com. ~~~