Kaseya Community

Agent Procedure - Simple Question

This question is answered

I feel like I have found this answer before, but, my google-fu has failed me. 

I am looking for a global variable (I looked through the help documentation and this forum post: http://community.kaseya.com/xsp/f/28/t/959.aspx and http://community.kaseya.com/xsp/f/28/t/11113.aspx

I can't seem to find a variable for the root group name. So if I have "Customer.Site.Computer Name" or <GroupID.MachineName>, I would like to get just CUSTOMER. So for example "Kaseya.NYC.4350.UserPC", I only want the variable to return "Kaseya". I have to imagine that it is a variable.

I can make a unique global variable for each client, but that seems rather ugly. 

Let me know if you have any ways to perform that call. 

Thanks in advance! 

Verified Answer
  • Your "Google-Fu" has not failed you, grasshopper. The thing you seek is but a myth.:)

    We required this as part of our RMM solution and at one time created a SQL view, but that didn't help our SAAS customers. We now use an app on the agent that splits the easily found machine.group.name and returns the customer_ID field. Called from executeShellCommandToVar() This should be fairly simple in VB, or even BAT (if your Bat-Fu is any good).

    Of course, this and much more are a standard part of our VSA solution.

    Glenn

All Replies
  • Your "Google-Fu" has not failed you, grasshopper. The thing you seek is but a myth.:)

    We required this as part of our RMM solution and at one time created a SQL view, but that didn't help our SAAS customers. We now use an app on the agent that splits the easily found machine.group.name and returns the customer_ID field. Called from executeShellCommandToVar() This should be fairly simple in VB, or even BAT (if your Bat-Fu is any good).

    Of course, this and much more are a standard part of our VSA solution.

    Glenn

  • Thank you . This is what I had thought. I think that I am going to go down the route of adding the global custom variable to be part of my onboarding process since it is created at the machine group level, I can set a static varible by company.

  • I assume you're referring to Managed Variables and not Custom Fields. Managed variables will work well, but you will need to remember to define them when you add new customers or new machine groups.

    We use a lot of managed variables, and debated over using this method, but opted for the script since we needed this for procedures. Running the split of an easily obtained value insured that we'd always have the data and it was maintenance/management free too boot.

    Glenn