Custom Agent - Feeding a parameter

Allright, I've looked around and haven't been able to find what I am looking for in terms of custom agent documentation.  I have a custom agent script that I want to make dynamic and be re-usable by being able to pass a parameter.  The hope was so that I could deploy many custom agent in which each agent could pass the parameter to get their individual metrics. Very much like a logfilter agent where you create multiple ones using the same agent, but you feed in the location of the logs that you want the agent to parse through.  In a similar fashion I want to be able to feed my script a parameter.

Secondly, when looking at a custom agent property I see the property 'cmdLine'.  Can someone explain the purpose of this property and how it is used?

  • Stefan

    Any update on your extension, I've got a over 50 custom agents and a number would benefit for being able to pass variables, it would certainly cut down my admin work.

    Cheers

    Andy

  • This thread is a bit old, but wondering if there's any update on this?

    Obviously, an official Quest solution for this would be ideal. I think it would be great to just have an added property to the standard script agents, cmdLineParameters or similar.

    I'm willing to possibly pursue the "complex" Java based solution described above but it sounds like that's probably overkill. There are a lot of "simple" perl/bash scripts that get the the job done just fine, if only we could pass them parameters in Foglight...

  • Given how seldom you change the parameters such as you describe, you could more easily deploy a simple config file to the agent location, and set your configuration in that file.  The prototype config file could be included in the zip file you feed to the script agent builder, and then be found and modified after the agent is deployed.  This is the process I have used for various PowerShell script agents, but would work for pretty much any language.

    Another approach would be to create a central config file, and have all of the script agents refer back to the central location to get the config information as required.

    Given how limited the F4 data structure is, there's not a lot of point in getting more complex until a new script agent mechanism comes along, possibly with a future F6 platform.

  • Hi

    Another option (although I've not had chance to test it) is http://fglide.apmcentral.org/ its a cartridge developed by Stefan Marx  for import/export of Foglight objects but there is an add-in to create custom agents with ASPs.

    Regards

    Andy

  • We have a lot of custom script agents modified like what is in

    http://en.community.dell.com/techcenter/performance-monitoring/foglight-administrators/f/4788/t/19552470.aspx

    Let's us put a parameter into the agent config which is passed to the custom script agent.

    Added a secondary ASP is a little bit more tricky, but also do-able...