Beginner with custom Agents

Just read a few posts on Custom Agents and got all excited!

I need to be able to monitor a specific folder and count the number of files with it.

If I have used a script like

strComputer = "."
Set objWMIService = GetObject ("winmgmts: \"& strComputer & "\root\cimv2" ")

Set colFiles = objWMIService.ExecQuery ("ASSOCIATORS OF {Win32_Directory.Name = 'c:\temp'} where" & "ResultClass = CIM_DataFile")

WScript.Echo "TABLE MXQueue.
WScript.Echo "START_SAMPLE_PERIOD."
Set objWMIService = GetObject ("winmgmts: \"& strComputer & "\root\cimv2" ")
Set colItems = objWMIService.ExecQuery ("Select * from Win32_ComputerSystem")

For each objItem in colItems
WScript.Echo "Host.String.id ="& objItem.Name.
Next

WScript.Echo "Mxqueue_File_Count ="& colFiles.count. "
WScript.Echo "END_SAMPLE_PERIOD."
WScript.Echo "END_TABLE.

As a custom agent that would do the trick? the above works well on a command prompt when I run cscript...

Hi Mike,.

You will not be able to download this script on its own, because the agent script needs a file to run.

What you need to do is to create a CountScript.bat file that runs "cscript count2.vbs".

Then you zip CountScript.bat and count2.vbs in a ZIP file named CountScript.zip and CountScript.zip in the generator to deploy Script Foglight Agent.

When this agent is deployed and created, CountScript.zip will be extracted on the target host.

When you enable this agent, CountScript.bat will run and generate the named parameters.

Please find a way to remove the 'Microsoft (R) Windows Script Host Version 5.7 Copyright (C) Microsoft Corporation. All rights reserved. "lines as the script will attempt to interpret these lines and generate errors.

Kind regards

Brian Wheeldon

Tags: Dell Tech

Similar Questions

  • Documentation of Custom Agents in development

    Are there documents specifically on the creation of custom agents and/or by creating the data model to host the data for these agents?  I understand that you can write about any script that collects data, but I don't understand how to set the data model for use with the script or if there are other common considerations that must be made during the development of the custom agents.

    There is a specific data model guide for Foglight, which includes a tutorial for adding new models.

    It is available online here: Guide of Foglight data model, or here on the Support Portal in PDF format: PDF data model Guide.

    For custom script agents, first read the Administration guide: Building Script Agents.

    Hope this helps,

    Shay

    SR. Technical Writer for Foglight

  • View the contents of the table on Custom Agent

    Hello

    I would like to create a dashboard with a table showing the ten entries with free low % of a custom agent that I wrote.

    The agent is when extracting data on data warehouses and each data storage capacity, % free and used. (this is temporary until we get approval from vFoglight)

    From what I see the agent is storing data as below

    • Agent_Name

      • tables
      • datastore_name
        • capacity
        • % free
        • used

    Is it possible to get a picture to view it as the below?

    Name of the data store % Free Used
    Datastore_3 10% 1.2 to
    Datastore_1 30% 800 GB
    Datastore_5 50% 500 GB
    ....

    Thank you much for the help

    Using WCF, it would be possible.  It is based on the normal approach of Foglight.

    • Find data
    • Enter the data in the structure you need
      • generally via a query or function
    • Send the result to a view in the context
    • Test it

    You can query against the Agent_Name/Tables level, to get you your ranks

    then use functions to dynamically create columns in the query result rows row

    Could start here http://en.community.dell.com/techcenter/performance-monitoring/foglight-administrators/w/admins-wiki/6155.custom-script-agent-1-leverage-an-existing-monitoring-script-to-push-data-into-foglight

  • Custom agent - a power setting

    Allright, I have looked around and have not been able to find what I'm looking for custom agent documentation.  I have a custom agent script that I want to make it dynamic and re-usable by being able to pass a parameter.  The hope was so that I could deploy several custom agent in which each agent could pass the parameter to get their individual settings. Looks a lot like a logfilter agent where you create several people using the same agent, but feed you to the location of the logs that you want to crawl through the agent.  Similarly, I want to be able to feed my script parameter.

    Second, when you look at a custom property agent I see "cmdLine" property  Can someone explain the purpose of this property and how it is used?

    Considering how rarely you change settings as you describe, you can more easily deploy a simple configuration file to the location of the agent and set your configuration in the file.  The prototype config file could be included in the zip file you supply the agent script generator, and then be found and modified after the agent is deployed.  It is the process, I used for various agents of PowerShell script, but might work just about any language.

    Another approach would be to create a central configuration file and all have the script agents refers to the central location to get the configuration information as required.

    Given how limiting the F4 data structure is, there is not much point in getting more complex until a new script agent mechanism, possibly with a future platform F6.

  • Custom Agent monitoring-policy confusion

    Hello

    I am facing a problem with a custom field I added to my custom Agent's primary EPA. The LiveSet agent allows you to monitor the LiveSet (memory used after a full gc) of our application servers and the added field monitors allows us to add additional servers to monitor for this specific host.

    The field is not appear however in change them the properties of some agents (even after deactiving a reinstall of the agent and reapply the surveillance strategy.) (XML).

    I added via the Script Agent Builder agent and imported the surveillance strategy. XML for this agent.

                    d76917f8-61e1-46fd-ba18-7cd5e9da1289        SPI        LiveSet        Foglight4-XML        default        template                        ab2d11d8-d31b-4d9b-b5f2-a8f9b44c1f41                                                                            Platforms_supported                    WinNT4.0 Windows2000 Windows2003 WindowsXP Linux2.4 Linux2.6 AIX4.3 AIX5.1 AIX5.2 AIX5.3 SunOS5.8 SunOS5.9 SunOS5.10 HP-UXB.11                                                                        agentName                    Collector                                                                        cmdLine                    LiveSet.sh                                                                        purgeDays                    180                                                                        purgeTime                    Days                                                                        sample_freq                    60                                                                        monitors                    localhost:7191 localhost:7192                                                    
    

    I had some difficulty in setting this up, so I repeatedly tested, deployed and applied monitoring - strategie.xml for this agent, that may have caused the configuration in order to be a little confused.  But in the end, the script is able to pick up the field as an environment variable and to monitor the appropriate servers, at least on agents that allow to edit the field in the section change the properties of the FogLight Console.

    An export of the configuration show that there are 3 separate persistable-config-model elements with different config-id for agent LiveSet. Two of them are missing from the added field monitors . I think that there should be only one entry in the configuration, and this is the origin of the problem for some deployed agents.

    I tried to delete configurations incriminated through a groovy script

    cs=server['ConfigService']models=cs.getConfigs('SPI', 'LiveSet')
    
    a=[]for (model in models)  if (model.getId() == 'e326abb9-95e6-459c-a179-293fe559fa70' ||      model.getId() == '92e879a1-21fa-4713-8f0c-c481ec997feb')     cs.removeConfig(model)
    
    models=cs.getConfigs('SPI', 'LiveSet')
    

    but he will raise an error:

    com.quest.nitro.service.sl.interfaces.scripting.ScriptAbortException: script1000680: java.lang.RuntimeException: Removing default configurations is not permitted.
    

    So my question is, is my problem actually caused by a corrupted configuration?

    How to solve this?

    Hope you can help.

    Kind regards

    ISP

    Hi Brian,.

    Thanks for your reply. I uninstalled the cartridge and unfortunately configurations 'by default' always appears. Before I go ahead with the name change Agent, is ask you if there is really no way to cleanly remove this corruption of the configuration. I'd rather not stuck with this type of corruption even if it does not affect the stability of the duration of FogLight.

    Kind regards

    ISP

    ------------ update -----------------

    Hello

    I managed to clean configurations incriminated with a workaround using the following procedure.

    1. Export the configuration via the command line
      fglcmd.sh - usr - pwd cmd - f util:configexport
    2. Extract all the persistence-config-modelagent LiveSet s in a new control - strategie.xml
    3. Change the config_type of all the extracted elements to test
    4. Import configuration
      fglcmd.sh cmd - util:configimport - usr pwd - monitoring-f - strategie.xml
    5. Run the following in the Script Editor in the Console FogLight groovy script
    cs=server['ConfigService']models=cs.getConfigs('SPI', 'LiveSet')for (model in models)    cs.removeConfig(model)
    
    models=cs.getConfigs('SPI', 'LiveSet')
    
    remaining=[]for (model in models)  remaining += model.getId()
    
    remaining
    

    Make an another export confirms that incriminated configurations are deleted.

    Relocation of the agent and the application of the custom monitoring strategy works now.

    Brian Merci for your time.

    Kind regards

    ISP

    Post edited by: Fai Fung

  • I need to be in touch with an agent who speaks french. Please this is my imail address important * @ *.

    I need to be in touch with an agent who speaks french. Please it's important my address imail - * @ *.

    < personal information under the direction of the host >

    There is no agent of Apple here. It's just a Forum user to only. Try the Apple Support here: official Apple Support

  • Firefox 4 deployment with custom user settings?

    Hi people,

    I want to deploy FF 4.0 with custom user settings, but where is the "localized" my prefs.js file folder? In FF 3.6.x we extract the setup.exe file and with sources, we have deployed our customized firefox. In FF 4.0 now, there is some file missing from news sources. Are there any documents that explain the deployment of FF 4.0? Thank you very much

    You can always create a folder/defaults/profile and places the files in this folder to have in a new default profile. Folders that have no content are no longer present in the version of Firefox 4 RC, but some are still read and processed.

  • We have a requirement of click to call in installing 10.5 UCCX with customer website (user input) for our customer

    Hello

    We have a requirement of click to call in installing 10.5 UCCX with customer website (user input) for our client, anyone who tested it in the laboratory/prod settings?

    Thank you!!
    Magali

    Hello magali.

    It is possible to deploy with UCCX HTTP trigger type. To get the number of customer via the HTTP trigger to the script. Then we can place the outgoing number of customer to campaign or appeal directly to the customer and place this call to the QSC.

    There are two scripts for web reminder in Cisco repository of scripts, see this http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/cust_contact/cont...

  • What will happen with my agent and active Windows 8, I will have bought with the laptop after I swap HDD with SSD?

    Original title: replacement disk and windows.

    Hello guys.

    I am considering buying a new laptop. The model that I found and I like has a HARD drive if I want to replace it with the SSD to the format of my previous laptop. (Due to the low energy consumption, greater speed, etc.). So I have a 256 gb SSD in my previous loan of laptop replace new one HARD disk, yet what will happen with my agent and active Windows 8, I will have bought with the laptop?

    I can reinstall windows 8 on the SSD, but I don't have a key to activate their... How will I be able to get the key from previous series if the laptops will only work with a recovery partition these days here? I asked a guy in the store, I buy my laptop since and he told me that he does not know and I have to ask for help. However, to create a message of support I need a serial number of the model I did not because I have not yet bought a laptop, so I don't know what to do... I really don't want to stick with the HARD drive, but also I can't afford another model.

    Is it possible to do a recovery with my laptop disk when I get it, then replace the drive with my SSD and run the recovery disc I made?

    The laptop I want to buy is an Asus if that helps...

    Thanks in advance...

    The 'Raw' State is not necessary, it is the State of any drive (SSD drive or hard drive) would be in if you just remove a disk new in box and will need to be "initialized", since you have already used the player already initialized sound.

    Do not format the drive, rather than delete all existing partitions, (the SSD shows then as being "unallocated"). Now you are ready to restore the backup Image you created. During the restore process Acronis will recreate the partitions that were on the hard drive on your SSD.

    J W Stuart: http://www.pagestart.com

  • How to create user defined groups and users with custom permissions as only open and export in obiee 11 g?

    Hello

    I want to give as open & export to the level of permissions.

    How to create user defined groups and users with custom permissions as only open and export in obiee 11 g?

    For example, if the group permissions, inturn should reflect on the users.

    Please help me.

    Thanks in advance,

    A.Kavya.

    Your question is quite broad and fuzzy then I suggest the security catalog presentation to read documentation: http://docs.oracle.com/middleware/1221/biee/BIESC/mgrgrpsusers.htm#CIHIBJGD

    And I think that you mix you two things which are managed in different places:

    ) an object as read access permissions, write, delete... which control you through the object "Permissions" dialog box

    (b) functional privileges controlled through "Manage privileges" under "Administration".

  • with selector Agent Dashboard App availability report

    Hello

    on 5.6.4 I try to create an availability report of the App with Agent dashboard selector.

    But what creation I'm lost by choosing the right element in Add a report View.

    I have tested many of them, but never could generate the same graph.

    The image of App availability with selector Agent Dashboard is attached as a file.

    Thanks for help.

    I'm not a fan of this point of view and think it would make a bad report because it only shows the current values.

    But if you really want to be able to abandon this view in a report, you can do this by adding "Reportlet" for the purpose of notice "Operation/AppMonitor/App availability with selector Agent systems" in the definition of WCF configured Editor.

    Kind regards

    Brian Wheeldon

  • Pages of the OPS (with custom controller) does not not in the R 12.2.4 upgrade custom

    Hi all

    There is a problem, I'm dealing with my custom page. I am trying to expand the controller with my custom class, but get the error below

    oracle.apps.fnd.framework.OAException: could not create Java class: (oracle.apps.xxar.cusstd.createcus.webui.xxArCreCusCO) associated with the area: (ArUtilRN). It is probably because the class name is incorrect or not included in the project.

    at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1247)

    at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1435)

    at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2848)

    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1991)

    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:567)

    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:455)

    If the file is present in the right folder

    [webui applmgr@gfs3devapp1] $ pwd

    / opt/oracle/gfs2d/FS1/EBSapps/COMN/java/classes/Oracle/Apps/xxar/cusstd/createcus/WebUI

    [webui applmgr@gfs3devapp1] $ ls - ltr

    Total 4

    -rw - r-. 1 applmgr oinstall 1177 Feb 25 10:17 xxArCreCusCO.class

    I have to follow this discussion, but is not help me: https://community.oracle.com/thread/3647610

    Please help.

    Thanks, Jerome

    Hello samia,.

    In R12.2.4, you will need to create the jar with custom classes. Please visit the Doc ID 1577661.1

    Hope this helps you solve your problem.

  • How chat with customer support?

    How chat with customer support?

    If you use the free Adobe Acrobat Reader software, there is no chat support.

    If you use another product, follow the steps here (Customer Contact) and if the chat support is available for this product, click on the big blue "still need help? Contact us' button and you will see a chat option.

  • Slideshow: How to replace on the arrows 'Next' and 'Previous' with custom arrows?

    On the homepage of my site, I put in a changing picture with Widgets Library > slideshows > Basic, then added in the images. the only thing I don't like is the appearance of the standard ' Next' and 'Previous' buttons. In want to replace their previous custom and buttons that I created in Photoshop. I tried to do by double-clicking on the icon 'Next' and then hit the blue circle/arrow, then press "Add picture" and select the file with the arrow custom, but instead to replace the icon/button 'Next', she just added the arrow custom slide show. I looked in the tutorials and help online but can't find an answer. Anyone know how to replace the arrows "Next and previous" with custom arrows?

    Hello

    To place your own images for the button previous and next, you use the fill feature. Please check the following steps:

    1. go slideshow options and uncheck the Edit set.

    2. Select the next button and click complete to open filler panel.


    3. click Add picture and select the image you want to use. Also select the type of connection as "Scale to fill" or "scale to fit"and make the 'Center'. "

    4 do the same for the previous button.

    Concerning

    Vivek

  • HI, I'm wanting the form tool allows you to create multiple copies of documents with customized in each information fields. From excel data. Is this possible?  Thank you, Charlotte

    Hello

    I am keen on the form tool allows you to create multiple copies of documents with customized in each information fields. From excel data. Is this possible?

    Thank you

    Charlotte

    This is called a fusion and mailing. There is a possibility of Embedment in some versions of Excel (via the Acrobat PDFMaker plugin), or it can be done using a script.

Maybe you are looking for

  • Satellite M40-223: behavior strange keyboard

    Hi, I have a problem with my laptop M40-223. Sometimes it happens that the keyboard goes completely crazy, you can't write anything, or just a few letters and all the system becomes unstable and I have to reset (sometimes several times). I don't real

  • Difficult to set sleep timer

    We just bought the Sony BRAVIA KDL55HX. Great TV EXCEPT - who made access to the Sleep function. All other TVs we had the timer had a button on the remote control to directly access the Sleep function. Depending on where the Home button has been used

  • Outgoing e-mail

    I use the mail account on my i - mac (using el capitan). My recently changed email provider the port 587; It was 995. My outgoing mail won't. I use another service for incoming mail that is not affected. Any ideas on what could be the problem?

  • Live copy of a deployment system

    I saw a reference to an article that explains why you can not just copy screws to a deployment system. I took as gospel, but now am being bothered by skeptics. I too got a way with a few times but more often now it does not work. Could you point me t

  • Problem out 5.1 Surround sound via the TV to a Home Theater (Override sound formats supported?)

    Hi, I'm trying out a sound 5.1 on my Home Theater system via my TV via a digital output optical. So the video card (Asus EAH5450) is capable of up to 7.1 output, is connected via HDMI to my TV (a LG 47LH5000) which then returns sound via an optical d