Script agent - monitoring telnet to a specific port connection

I created this script agent as described below. Although when I deploy and create agent, I don't see an agent created on the dashboard of the Agents, or the data browser.

Any other suggestions? Recommendations to improve extensibility? Also, if I have several hostnames and several ports, what is the best way to implement who?

OMNI_PortMonitor.sh

echo OMNI_PORT_HLPOM560_20301 TABLE

echo START_SAMPLE_PERIOD

HTTPSERVERIP = "hlpom560.someDomain.com".

echo HTTP_SERVER_HOSTNAME. String = $HTTPSERVERIP

HTTPSERVERPORT = "20301.

echo $HTTPSERVERPORT = HTTP_PORT

TELNET = $(which telnet)

(

echo "exit".

) | $TELNET $HTTPSERVERIP $HTTPSERVERPORT | connected grep > / dev/null 2 > & 1

If ["$?"-not "1"]; then

echo PORT_STATUS = 0

on the other

echo PORT_STATUS = 1:

FI

echo END_SAMPLE_PERIOD

echo END_TABLE

Thank you

#AJ

Hi AJ,.

The best practice is to design your script so that it checks for the environment variables populated by a secondary ASP. If these environment variables are not defined, the script can set values of relief.

I know that you have used the custom ApacheStatus agent. The collector for this agent, ApacheStatus.sh script, check the variables of environment generated by ASP. If they are not present, the script hard code a list of values. This allows the script to execute and generate data of interest from a list of servers Apache targets from the command line. You can modify your script to do the same.

Kind regards

Brian Wheeldon

Tags: Dell Tech

Similar Questions

  • 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

  • Application of force to use specific ports

    Hi all
    I have an application that uses random ports.  This could be good behind a typical personal router, but is not possible with the current implementation.  The program is an application of video conferencing with Polycom collaboration, and the app is telepresence m100.
    The release notes for m100 indicate a few random ports are used for some protocols.  (See page 21)  Our network firewall device requires a game port assignment and our security protocols do not allow an open machine.  We would also like to use this m100 of telepresence on multiple machines, so a DMZ is not an option.  The application does not allow the user to select specific ports.  Request support with Polycom has been less then helpful (answer: it uses a random port).

    So here I wonder if there is a way on XP or 7 to force an application to use ports or range of ports, perhaps 4-5 assigned ports, not 65535.  The nature of the beast requires several ports open, not one.  Also, remote machines will have the same configs, so one of these machines could initiate/receive calls with all the others.

    John

    Questions of this nature are better asked on Technet

    http://social.technet.Microsoft.com/forums/en-us/categories/

  • LRT224 Port forwarding of specific Port

    Is it possible with this router to do port forwarding on a specific port to a pc?

    I have a basic need:

    Transfer the incoming request to WAN port 37777 to RDP port 3389 to the local server xxx.xxx.xxx.xxx.

    I try to do a formward configured like this:

    Service: 37777 (custom)-37777

    IP address: XXX.XXX.XXX.XXX:3389

    But I can't save this configuration (wghite page is displayed).

    How can I access with RDP on my public IP address on a specific (not the standard 3389), the port of my business and be sent to a specific server?

    for example: RDP at yyy.yyy.yyy.yyy:37777 connects to the server local xxx.xxx.xxx.xxx

    So far, I can only access this server with rdp standard port on the public ip address.

    Thank you

    The LRT224 supports the translation of address of Port (PAT). With PAT, each computer on the LAN is translated at the same IP address, but with a different port number assignment.

  • IP address to a specific port

    How can I assign an IP address and a specific port on a powerconnect switch 6224?

    Thanks for the explanation.

    When you connect two layer 3 devices, you need a network isolated between devices. The process is similar between Cisco and PowerConnect.  The difference is, as you said, you cannot set an ip address on the port itself with Powerconnect.  As you would with Layer 3 devices Cisco.

    Are the switch A and switch B of PowerConnect?  Or is a Cisco and the other Powerconnect.

    If both are PowerConnect.  You will need to create a VLAN to be only used to one port on each of the 2 devices.

    Switch to # config

    Switch database has (config) # vlan

    A(config-vlan) switch # vlan 2

    Switch A(config-vlan) # exit

    Switch to (config) # interface vlan 2

    A (config-if) # name of the L3 switch connect switch

    Switch # 192.168.1.1 ip address A(config-if) 255.255.255.0

    Switch A(config-if) # exit

    Switch to (config) # interface ethernet xxx

    Switch A(config-if) # switchport mode access

    Switch A(config-if) # switchport access vlan 2

    --------------------

    The B switch configuration:

    B # config switch

    Database switch B (config) # vlan

    B(config-vlan) switch # vlan 2

    Switch B(config-vlan) # exit

    Switch B (config) # interface vlan 2

    B (config-if) # name of the L3 switch connect switch

    Switch B (config-if) # ip 192.168.1.2 address 255.255.255.0

    Switch B (config-if) # exit

    Switch B (config) # interface ethernet xxx

    Switch B (config-if) # switchport mode access

    Switch B (config-if) # switchport access vlan 2

    Next, you will want to check to make sure IP routing table that's list a path to all networks on both sides.

    You will probably need a specific static route defined for networks or by default.

  • By the way a specific port number

    Hell-o,

    My question is about the PIX515e. We have a Server Windows ISA firewall we want to retire. I need to move the ports that have been opened in this area of ISA for the PIX. On AIS, he simply says "send and receive port tcp 5510' for example. Is it possible on the PIX of this port is very simply to apply. Without having to create a static entry? A way to simply open a specific port number?

    Suggestions, ideas or advice greatly welcome,

    TIA,

    Gary

    Which starts the connection, the interface of high security to low or low security interface to high? If she is brought down, do nothing, it will allow by default. If it is low to high, you must 1) of static type and 2) an access list. The acl is not reference IPs, but it should (security reasons - the whole point of the PIX). For example:

    (1) static (inside, outside) subnet to the 10.10.10.10 x.x.x.x 255.255.255.255 mask (or use a range of IP addresses)

    or

    static (inside, outside) 10.10.10.10 10.10.10.10 (if nat disabled)

    and

    (2) access list 102 permit tcp any any eq 5510

    or

    access list 102 permit tcp any host x.x.x.x eq 5510 (better)

    or

    access-list 102 permit tcp host y.y.y.y host x.x.x.x eq 5510 (best)

    Access-group 102 in external interface

    It will be useful.

    Steve

  • How to create and assign a VLAN to specific ports

    In our ISA550W, create the VLANS for different subnets and assigning them to specific ports are a piece of cake and self explanitory.

    However on a SG300-10MP, I am totally lost lol. I just want to make ports 7 & 8 set to a sous-reseau.10 instead of un.6 as the rest of the switch. I need these ports to be totally independent from the rest and not to communicate with others at all.

    How can I do this?

    Thank you!

    Hi Alex,

    Under management of VLANS, go into settings of the interface.  Change the interfaces that you use to access the ports by choosing the way you want by clicking on change.

    Once they are access ports back to Port for page VLAN and assign the port desired as one not marked in this interface.

    This should be everything you need, let me know if you have any other questions.

    -Good Trent

    * Please note the useful messages! **

  • ASP for script agent

    I may have asked this before, but is there a way to create the FSA for a script agent?

    All the examples, someone can tell me?

    It's true, but unfortunately this feature of the fglide is a little 'weea' in the documentation.

    But I saw some interest for this feature in the past few weeks and I'll create movies from screen-cam more explaining the creation of Agent step by step.

    I want to download the first couple at the end of the week, if I can get my audio equipment works with my new PC.

    Stefan

  • PIX Site to Site VPN to aid to specific port

    Good day to all!

    I know that to have establish a site to site VPN using 2 PIX firewall, it should be noted the interesting traffic on both sides. Usually, we make the following statement:

    accessList AllowedTraffic ip 192.168.2.1 allow 192.168.3.1

    But I thought what happens if specify us specific ports on the

    The ACL that is used for interesting VPN as HTTPS traffic? Like the one below:

    Acccess-list AllowedTraffic tcp 192.168.2.1 192.168.3.1 eq 443

    Comments would be nice...

    Thank you...

    Chris

    Here are my configs when I tested it. I hope this helps! If Yes, please rate.

    Thank you

  • Script agent does not

    All,

    I just downloaded and deployed the following script agent. Everything seemed to be going perfect. If I navigate to the fglam > State > agent > myagent > scripts folder and run the .sh script he things seem to work as I want. I let the agent walk for an hour while I went to lunch and I still don't see anything in the model. No idea where I was wrong?

    Solaris with 5.5.8.2, FMS1 5.6.5 on centOS fglam.,.

    [code]

    # [email protected]

    #

    #! / bin/bash

    #somestuff

    variable #define

    EIMJobStartTimeUTCTimeStampString = 0

    EIMJobStartTimeDate = 0

    EIMJobStartTimeTime = 0

    CurrentDate = 0

    #Scrape file for journal information and format it in vars

    EIMJobStartTimeUTCTimeStampString = $(tête-n 1)< `ls="" -t="" pt/myawesomeapp/enterprises/prod/prod_app1/log/eim*.log="" |="" head="" -n="" 1`|="" cut="" -f="" 2,3="" -d="" '="">

    EIMJobStartTimeDate = $(echo $EIMJobStartTimeUTCTimeStampString | awk '{print substr ($0, 0, 10)} ")

    EIMJobStartTimeTime = $(echo $EIMJobStartTimeUTCTimeStampString | awk '{print substr ($0, 12)} ")

    CurrentDate = "date".

    #echo our results for the test, do not include in the cartridge

    #echo $EIMJobStartTimeUTCTimeStampString

    #echo $EIMJobStartTimeDate

    #echo $EIMJobStartTimeTime

    #Echo results in format Foglight

    echo "TABLE EIM_JOB_STARTTIME"

    echo 'START_SAMPLE_PERIOD '.

    echo "StartTime.StringObservation.obs is"$EIMJobStartTimeUTCTimeStampString ".

    echo "StartTimeDate.StringObservation.obs is"$EIMJobStartTimeDate ".

    echo "StartTimeTime.StringObservation.obs is"$EIMJobStartTimeTime ".

    echo "SystemDate.StringObservation.obs is"$CurrentDate ".

    echo 'END_SAMPLE_PERIOD '.

    echo "END_TABLE.

    [/ code]

    Here is the result, it "seems" be correct

    -bash-3,00$./EIMJobStartTime.sh

    TABLE EIM_JOB_STARTTIME

    START_SAMPLE_PERIOD

    StartTime.StringObservation.obs = 2013-03-15 21:09:52

    StartTimeDate.StringObservation.obs = 2013-03-15

    StartTimeTime.StringObservation.obs = 21: 09:52

    SystemDate.StringObservation.obs = Friday, March 15, 2013 21:11:26 UTC

    END_SAMPLE_PERIOD

    END_TABLE

    -bash-3, $ 00

    When I "get log" on the agent, that nothing ever happens for this agent.

    5.6.5 seems to have a bug regarding the agent data of custom script that appears in the data browser.

    Try to restart the FMS service, others have seen it solve the problem in topology view.

  • Network ACL two specific ports

    As I know there is no way to set ACLs for network such that only two specific ports are available. I'm using Oracle 11 g 2.

    I would like a HTTP and SMTP port opened for local loop address. These are ports 7777 and 25. It is my understanding that you can have only one of the ACL for each host. While it seems that you can create others, any additional ACL for the same host does not always work as expected. So does anyone have tips that how can I do this? I'd rather not have all ports between 7777 and 25 available but this is what I currently have...

    DBMS_NETWORK_ACL_ADMIN. (ASSIGN_ACL)
    ACL = > 'local_loopback.xml '.
    , host = > "127.0.0.1"
    lower_port = > 25
    upper_port = > 7777
    );

    Captain Egg wrote:
    As I know there is no way to set ACLs for network such that only two specific ports are available. I'm using Oracle 11 g 2.

    Not the case in my experience. An ACL can be for a specific purpose, but contain multiple ports for this purpose.

    For example I assign ports 80, 8080, 7777 and some others, in a single web - acl.xml, to a target of network (host or domain).

    Read the usage notes in the PL/SQL package of database, Oracle®, and reference Types.

  • Hi there, that someone know if this is possible (script?) to find and replace specific words that are defined as a normal font bold font in adobe illustrator?

    Hi there, that someone know if this is possible (script?) to find and replace specific words that are defined as a normal font bold font in adobe illustrator?

    very easy in InDesign. can not imagine a way off of the bat in illustrator.

  • Package Foglight - Custom Script Agent, a file?

    All,

    So, I am writing a custom script agent. It requires some bianary custom to be in the same folder. Is it possible to pack these bits in the agent?

    Thank you

    It is a pity that your screenshot does not show the corresponding part of the log file and the log file is not zipped and fastened. Otherwise, maybe your version, platform, and the FMS symptom matching the error described in SupportLink Solution 82250: https://support.quest.com/Search/SolutionDetail.aspx?id=SOL82250&category=Solutions&SKB=1&product=Foglight ?

    If so, an upgrade may be required to resolve the issue.

    Kind regards

    Brian Wheeldon

  • Disabling paths to migrate all storage CF specified on HBA port connections

    Hello

    Do any PowerCLI guru knows a way to run a script to disable all the paths to a FC hba card port specified? I need to move all my storage to 1 port on my HBA to allow me to remove one of my storage switches and by VC is very slow

    Gregg

    I had a quick look and I suspect that the port WWN is the best way to select the paths that are connected to a specific port.

    The script becomes something like that

    $tgtHBA = "vmhba1" $tgtPortWWN = "5766023041194672011" Get-VMHost | Get-ScsiLun -LunType disk | where {$_.RuntimeName.Contains($tgtHBA)} | ` Get-ScsiLunPath | where {$_.Extensiondata.Transport.PortWorldWideName -eq $tgtPortWWN} | ` Set-ScsiLunPath -Active:$false
    

    To get an overview of the host, the HBA, the targets and the WWN of the port, you can do

    foreach($esx in (Get-View -ViewType HostSystem -Property Name,Config.StorageDevice)){
        foreach($hba in $esx.Config.StorageDevice.ScsiTopology.Adapter){
            if($hba.Target){
                $hba.Target | Select @{N="VMHost";E={$esx.Name}},
                    @{N="HBA";E={($esx.Config.StorageDevice.HostBusAdapter | where {$_.Key -eq $hba.Adapter}).Device}},
                    Target,
                    @{N="Port WWN";E={$_.Transport.PortWorldWideName}}
            }
        }
    }
    
  • Port connection settings

    How can I configure my WRT600N router for a service that I have who wants to upload to a specific Port to enable SSL

    What can you do? Access the http://192.168.1.1 router configuration page

    Change MTU - manual, size - 1364 - save settings when the settings are successful click continue you will be returned to the same page.

    Then click on Security tab and uncheck the anonymous Internet filter click request then on save settings and then continue.

    Then you click application and games tab and then click the Port triggering sub-tab

    Application name no matter what to type for example: 1, or any name you want - through the name of the application, you have 4 boxes for Triggered start and end Port and end Port before beginning Rage.

    Type the 80 numbers through all 4 boxes and of the same type in each type of second application name a different name with numbers in the departure Port 443 and 447 in the end for triggered Port and transfer port two.

    Similarly, in the third the application name type a different name with no 500 in boxes of four for trigger and Range.Then to advance all 3 checkboxes as enabled and then click on save settings.

Maybe you are looking for

  • S video, no color image on Qosmio G10

    By getting only a B & W picture on G10 when connected the STB to watch in the port with switching SCART to S video cable.Have the value monitor in sVideo in utilities development photo Tosh & TV in PAL (such as the United Kingdom).In the disposition

  • Toshiba still 2 write - when they are available in the United Kingdom?

    I'm desperately looking for a tablet of budget / 2 in 1 laptop that will allow me to take decent notes with a stylus. The Surface Pro 3 is beautiful but out of my price range at that time. The Toshiba Encore 2 write is available in the United States

  • The issue of RTOS task duration

    Hi, I am a novice in programming on RTOS. I have a question about the design of special function.  For example, the system scale is 10ms, If a task cannot complete a loop to within 10 ms (a function in a loop), then how I can guanrantee time of execu

  • Impossible to download Vista SP2, "Unknown Publisher".

    I have Vista SP1. Could someone help me please? I've been struggling with my phone for 3 weeks now. I restored to factory settings and the first thing tried to manually download SP2 from the Microsoft site. At the end of the download, I get this mess

  • Unable to connect to the printers connected to computer win xp on network

    All our computers are running win xp 32 bit all are updated to the same version of updates and service pack 3. On the computer we recentlty built, we run an i5 processor. The system works very well but still cannot connect to the Brother laser printe