Kaseya Community

Passing SD Variables to regular procedures

This question is answered

Hi All.

I am trying to automate a Service restart on a windows workstation using the service desk.

Is there a way of passing variables from SD Procedures to regular Procedures?

 

e.g

get name of service that has failed in a SD procedure.

Pass to regular procedure

Run windows restart service function

Send update back to SD Ticket.

 

Thanks for the help!

Verified Answer
  • One of the service desks I posted in the Service Automation thread does this (the ServiceRemediation desk).

    It isn't so much about passing a variable to a regular agent procedure but dynamically building an entire agent procedure from service desk that does anything you want. If you dig into the Service desk a little you can see how this is done. 

    Another method you could use would see you create a procedure that looks for the service name in a custom field and collects it to a variable (Get Variable -> System Info -> Select field), then somewhere in Service Desk you will have to run the SQL to populate that custom field for the target agent with the service name.



    [edited by: Ben at 7:35 AM (GMT -7) on 5-18-2012] .
All Replies
  • One of the service desks I posted in the Service Automation thread does this (the ServiceRemediation desk).

    It isn't so much about passing a variable to a regular agent procedure but dynamically building an entire agent procedure from service desk that does anything you want. If you dig into the Service desk a little you can see how this is done. 

    Another method you could use would see you create a procedure that looks for the service name in a custom field and collects it to a variable (Get Variable -> System Info -> Select field), then somewhere in Service Desk you will have to run the SQL to populate that custom field for the target agent with the service name.



    [edited by: Ben at 7:35 AM (GMT -7) on 5-18-2012] .
  • Hi Ben,

    I have actually already looked at your Service Automation thread, impressive as it is, it isnt really practical for us. As we are limited to 2 boards, automating things the way you have isnt practical.

    Im currently working on a Service Desk that can automate every issue that is picked up by the monitoring. The only issue im having is passing variables between the SD and Procedure.

    I am looking at using custom fields, but again its not really practical because if several Service failure tickets are generated at the same time, the custom field would be overwritten several times before the procedure has a chance to read the value.

  • An added requirement would also be passing from a Monitor Set a variable through to SD .. ie if a service stops then the service name is available as #ln#  from the alarm ..so pass this variable to SD .. and then following any SD workflows etc allow SD to pass the same variable back to the regular Agent procedure to attempt remediation or any other function defined within the agent procedure.

    We've also considered Custom fields but came to the same conclusion re what to do if multiple services stop and hence still do all our remediation within the Agent procedure and then create a SD ticket irrespective of the outcome ( ie succeeded or Failed to Remdiate.)  By including in the summary sent to SD a tag i.e Success or Failure ) we either auto close the ticket immediatley after creation and assign a category of  "Auto Remediated" if the Agent procedure managed to resolve the issue , or  if remediation failed we let the normal SD escalation processes kick in

    Paul

  • Hi Ben,

    I had to come and correct myself, after further study of your ServiceRemediaton desk I had learnt what I needed and now totally understand your meaning :-D I can see allot of work went into this, the help is really appreciated, thanks for releasing it in the first place.