Groovy Foglight Shell - FSMAlarmFilterConditions object

Is it possible using shell object to create a FSMAlarmFilterCondition and then attach it to a FSMChildService?  I would be grateful if possible, a code snippet.  So far, I get returned null when I try to create the FSMAlarmFilterCondition.  I was defining the expression, include, controller and topologyObject property values.  This is part of the script that I have for the creation of FSMServices and its components.  I need to add an alarm filter to one of the FSMChildService objects.

I was able to develop a process to add an AlarmFilter to a service.  Here are the relevant excerpts from one of my scripts that perform this action.  Hope this helps.

....

Subroutine/function definition

def createOrUpdateObject (typeName, propertyValues)}

topSvc = server. TopologyService;

def type = topSvc.getType (typeName);

objShell = topSvc.getObjectShell (type);

propertyValues.each ({propertyName, propertyValue->

def prop = type.getProperty (propertyName);

If (! prop.isMany ()) {}

objShell.set (prop, propertyValue);

}

ElseIf (propertyValue instanceof Collection) {}

objShell.getList (prop) .addAll (propertyValue);

}

else {}

objShell.getList (prop) .add (propertyValue);

}

});

Return topSvc.mergeData (objShell);

}

.....

Create DB hosts

def dbHosts = createOrUpdateObject ("FSMChildService", [name: "DB Hosts", parentService:trialService]);

.....

Add alarm filter DB guests

nameUUID = UUID.randomUUID (m:System.NET.SocketAddress.ToString ());

try {}

als_query = "AlarmSeverity where name = 'Fatal'"; "

als_s = querySrv.queryTopologyObjects (als_query);

def als;

{als_s.each}

ALS =;

}

dbHosts.alarmFilterConditions.each {filter->

If (filter.severityThreshold.name == "Fatal" & filter.expression.contains ("DBO"): filter.expression.contains ("Oracle")) {}

alarmFilter = topSrv.getObject (filter.uniqueId);

topSrv.deleteObject (alarmFilter);

}

}

AFC = createOrUpdateObject ("FSMAlarmFilterCondition",

[

name: nameUUID, conditionId:nameUUID,.

expression:"@alarm.get ('topologyObject'). GetType () .getName () .contains ("DBO") «»

include: false, topologyObject:dbHosts,.

severityThreshold:als

]

);

} catch (Exception e) {}

Msg. Append ("exception: alarm filter\n");

Msg. Append (try ());

return msg;

}

Msg. Append("AlarmFilter:"). Append (AFC. (Name). Append ('\t'). Append (AFC). Append ('\n');

createOrUpdateObject ("FSMChildService", [name:dbHosts.get ("name"), parentService:trialService, alarmFilterConditions: [afc]]);

Tags: Dell Tech

Similar Questions

  • Foglight - remove obsolete objects Script

    Hey guys,.

    I want to get some old items cleaned off Foglight. I was going to use the script of stale object delete but I want to make sure I do this right

    I have a virtual machine that has several installed on OSCartdiges, he has also agents customized.

    What would my topologies?

    https://support.quest.com/SolutionDetail.aspx?ID=SOL64596

    Your topologies will have the name of your agents customized them.

    Create a support group Foglight, then open the instant diagnostic file. In the file will have a list of all topologies.

    Search for the string "Effective Num" to locate the section where topologies are listed

    Note: There are other ways to see all topologies as entering the Script Console and listing topologies

    David Mendoza

    Foglight Consultant

  • Groovy foglight api access code, must study info db-tables foglight

    Hello

    I need to build the report that gives details of alarms as recognized time, gravity, host, crΘation, rule that generated this alert, message etc, I know we can use directly readymaid alarm dashboard or we can build the custom dashboard, but we are facing problems of latency using the custom dashboard or dashboard system provided so we want to query the database tables Foglight directly and find additional information. I do not have access database oracle required from now, so I would like to know the names of tables and schema name associated with the alarms.

    I know we can get alarm associate script editor information and explore a bad api so I wrote code groovy with the help of the api to access the AgentService or AlarmService, but I don't know how to access the SchemaView methods, TableView or table interfaces that provides required methods that can provide db information.  SchemaView or TableView or Table are not part of the services listed, so I don't know how to use the methods listed under this interfaces.

    For example if I want to know the name of the schema where the name of the table is: alarm_alarm OR if I want to know all available under particular schema tables and then how to get the use of groovy and foglight Explorer api.

    Can someone show example how to make use of available methods from interfaces (SchemaView, TableView or table) of theses.  (Joint screenshot of this 3 interfaces that I want to explore and use the methods of the it)

    Thank you

    Derrick

    Additional accessories:

    Regarding your condition to "build report which provides information of alarms as created in time, acknowledged the seriousness, host, time, rule that generated this alert, messages etc.", there is an example of using the RuleService API and AlarmService to generate a similar report in Foglight Reporting using metric queries or Groovy. See the example "Generate a list of all current alarms with details" for more details.

    Kind regards

    Brian Wheeldon

  • How to add the transient attribute for LOV (object of the view read-only)

    I have a view called CustomerView and attribute DepartmentId is present in it.

    Also exists DepartmentView and CustomerView.DepartmentId has an LOV from this point of view.

    I need to add a transient attribute to CustomerView which express the DepartmentName attribute in the LOV.

    Because of the view are read-only there is no entity object don't match them.

    How can I write the groovy for the transitional object expression.

    The name of the view accessor Lov's DepartmentView1

    Looking for your help. Thank you.

    Hi gcoban

    I do not understand your question correctly,

    you are not able to write to the expression property in viewObject?

    or you want to know how to write groovy for that?

    for writing groovy you need viewAccessor and you who have, you can try as Alejandro Tovar Lanz suggested

    or you can write code in RowImpl to fill in the name of the Ministry of the accessor

    See -https://blogs.oracle.com/adf/entry/combo_lov_how_to_display

    Thank you

  • Groovy - BC Business Rules control field value

    Hi all

    Version: 11.1.1.4

    I'm trying to figure out how I can add a business on my model layer rule to check a value. I don't see a Boolean selection in the groovy on the entity object attribute selections under compare?

    Not sure how I could achieve with the selections of available rules?

    Basically, I wanted to do something like this:

    if(StartDate == null)
    {
      return false
    }
    else
    {
      return true
    }

    If you need to create using validation complex groovy. Here are some links to start with:
    http://www.Oracle.com/technetwork/developer-tools/jdev/introduction-to-Groovy-128837.PDF
    http://download.Oracle.com/otn_hosted_doc/JDeveloper/11gdemos/ADF_Insider_Groovy/ADF_Insider_Groovy.html
    http://blogs.Oracle.com/raghuyadav/2010/06/groovy_samples.html

  • Error using groovy to fill the transient attribute

    Hello

    I wrote this function in my custom extension of ViewObjectImpl
        public String getRecordStatusDesc(oracle.jbo.domain.Number status) {
            if (status.equals(-1)) {
                return "New";
            } else if (status.equals(0)) {
                return "OK";
            } else {
                return "Unknown";
            }
        }
    And I want to use it to fill a transient field in my display object. I use this code as the groovy expression
    adf.object.getRecordStatusDesc(OpStatus)
    The RS of the attribute is defined as oracle.jbo.domain.Number, as shown in this excerpt of the file XML of the entity object depends on the view object
      <Attribute
        Name="OpStatus"
        IsNotNull="true"
        Precision="1"
        Scale="0"
        ColumnName="OP_STATUS"
        SQLType="NUMERIC"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        TableName="OPERATIONS">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="22"/>
        </DesignTime>
        <Data>
          <Property
            Name="ID"
            Value="390789de-0123-1000-8158-c0a8380116d6::::EntityObjectAttribute"/>
        </Data>
      </Attribute>
    But when I run with the tester of business components, I get this error
    (oracle.jbo.JboException) JBO-29000: Unexpected exception caught: groovy.lang.MissingMethodException, msg=No signature of method: 
    com.test.extensions.TestViewRowImpl.getRecordStatusDesc() is applicable for argument types: (java.lang.Long) values: [-1]
    Can someone tell me what I am doing wrong? I use 11g r1

    Hello

    ADF. Object returns the instance of ViewObjectRowImpl not an instance of viewobjectImpl, try using viewObject

    Sample:

    ((CustomViewObjectImpl) viewObject) .getRecordStatusDesc (OpStatus)

    Jean Lou

  • The use of shell object - documentation

    Looking for documentation on the use of shell object.  I found a few scripts here which gave a basis of a script, but now need to expand it.

    Hi Doug,.

    getObjectShell() is a method in the TopologyService.

    This method is documented if you run

    Help server. TopologyService

    in the Console/Script Editor.

    In recent versions of Foglight, which is related to the Java Doc:

    getObjectShell

    com.quest.nitro.model.topology.TopologyObject getObjectShell(com.quest.nitro.model.topology.TopologyType type)
    
    Returns an object of the specified type that has all it's undefined fields.  Of object shells are supposed to be filled with known topology information and then be merged back into the topology via one of the mergeData methods.
    Parameters:
    type-the type of the requested object
    Returns:
    empty the object

    getObjectShell

    com.quest.nitro.model.topology.TopologyObject getObjectShell(com.quest.nitro.model.topology.TopologyObject object)
    
    Returns a shell that allows the data to be merged into the specified object.  The hull returned by this method is configured with the identity of the specified object property values and can be merged immediately.  The shell must be updated with the actual changes that must be made to the object.
    Parameters:
    object-l' object for which a shell is necessary
    Returns:
    the shell
    See also:
    getObjectShell(TopologyType)

    Here is an example of a function using this method:

    def createPlaceholderHost = {String p_hostname, String p_ipaddress->

    TS = server.get("TopologyService");

    def host = ts.getObjectShell (ts.getType ("Host"));

    def ip = ts.getObjectShell (ts.getType ("IPAddress"));

    IP. Set ("longName", p_ipaddress);

    IP. Set ("name", p_ipaddress);

    IP. Set ("address", p_ipaddress);

    Host.Set ("longName", p_hostname);

    Host.Set ("name", p_hostname);

    host.getList("ipAddresses").add (ip)

    Return ts.mergeData ([ip, host]);

    }

    createPlaceholderHost ("somehostname", "10.2.45.165")

    Kind regards

    Brian Wheeldon

  • Windows XP infected object-keep coming back even after the execution of malware: HKEY_CLASSES_ROOT\regfile\shell\open\command\ (default)

    I have a recurring problem with the same recurrent infection, even after it has scanned and quarantined.  I even disabled the system restore so it will not be awarded in the registry when you run the Malware scanning program but it comes back. I had an infection Trojan.Zelolaces! inf a few months ago but it think that it has been fixed.  Completely, I reformatted the hard drive and got help with her Dell but I'm just not sure now with this continuing return of this infection.  Every now and then I also strange things happen with my files such as things appear in them outside the folder as an image of what is in the folder but when I open the folder, that is not actually in the file.  I do a lot of embroidery and have a lot of files for my embroidery machine stored on the computer.  Sometimes it seems that some of the files disappear as they just disappear.  It was part of the problem, when I had the Trojan horse.  If anyone knows what I have to do to fix this I am of course happy to help.  The following two paragraphs are messages that I get after scanning with malware.  Also, I have two external backup drives.

    Again, here is what appears when I run a scan with Malware:objects infected: HKEY_CLASSES_ROOT\regfile\shell\open\command\ (default)...

    Then under other: bad:(NOTEPAD.) EXE%1)good:(Regedit.exe"%1")

    Thanks for any help you can give me. Jan

    XP forums:

    http://social.answers.Microsoft.com/forums/en-us/category/WindowsXP

    Link above is for XP Forums.

    There is a list of the different Forums XP to the link above to help you.

    You get the help you need there.

    Here is the Vista Forums.

    See you soon

    Mick Murphy - Microsoft partner

  • Display object attribute transitional (calculate amount) using groovy problem

    Hello

    I have a read-only view object named 'ConnectionVVO '. And there the database field name ' points of "(type is number)."»
    Now, I need to take the sum of the points.

    For this, I did the following.

    View free object added to the same view as a view accessor named 'ConnectionVVO1 '.
    Created a transitional attribute named "TotalPoints".
    Added after groovy as an expression of the value of the transient above attribute.
    adf.object.ConnectionVVO1.getRowSet().sum("points")
    After that, when I run the module the application and run the view object that is extremely slow. In fact nothing had appeared. After I changed the sql statement and added a clouse where clause to select a few lines.
    Then he was appeared without delay.

    The table has about 11 million documents.

    Could you please provide a tip or any other way to do this (get the sum of the points).

    Help, please.

    Published by: benoit on March 9, 2011 14:56

    The problem is that you browse through all the data to summarize all the point values. Do this to 11 million lines takes time (lots of db back and forth). This is the reason why you must use a new VO with a query like

    select sum(points) from yourtable
    

    When you run this VO the sum is constructed in the comic book, using caches generate with one trip to the db and the DB. This should give you much better performance.

    The solution you found in the blog is only good for small data sets.

    Timo

  • Shell Scripts installation / migration of an object

    Hi all

    We are on Oracle Applications R12 and we settle down with it. Our database servers and the app are under Linux. To migrate objects from one instance to another, or to install objects, we use two different approaches. One is to move objects manually using installation instructions (MD120) and the other using Shell scripts. We must now choose any of these two approaches. But we are not able to decide. Grateful if you can help me answer questions more. This will greatly help us to complete the process. I'm for the Shell Script. But if I'm good arguments / reasons, I am not against.

    1. who will be responsible for moving objects or migration? What DBA? If not, who? We DBAs perform this task.
    2. our DBAs have argument if they move using script, there will be a question of great control over what moves in database / application server. (Our DBA is no previous case management experience Oracle Applications. There used to be an Oracle DBA for Peoplesoft)
    3. If we have a few side by side comparison or a link to that will be perfect.
    4. If someone has a case study and / or best practices document from the industry on this issue, please share it with me. My email is [email protected].

    Earlier, I worked only in consultation of the companies where only the Shell script was the standard and best practices. It is my first company to the end user.

    Appreciate the help and thank you in advance.

    CAH

    Hello

    If you are willing to spend money, you could go with "Oracle Change Management Pack Application" as it can be used to migrate the changes / installation from one instance to another.

    Application Management Pack and Application Change Management Pack 3.1 now available
    http://blogs.Oracle.com/stevenChan/2010/01/amp_acmp_31_ebs.html

    Thank you
    Hussein

  • View object: how to get the value of a 'connection variable' by using expression groovy?

    Hi all

    I have a view object, and I set a variable binding for the VO. Then, I want to set the default value of an attribute of the VO to the variable binding.
    I try to set the Type of object to the Expression attribute value and the value in the name of the connection variable. But it does not work.

    My question is how to use a bind variable in groovy script?

    Thanks in advance and sorry for my bad English.
    Samson Fu

    Hi Samson,.

    Try this:
    viewObject.getNamedWhereClauseParam ("Your_Bind_Variable_Name")

    Note: Keep the viewObject is, don't replace with your name viewobject

    Jean Lou

  • Always full DB after execution remove objects obsolete groovy

    Someone at - it suggestions for clear a space. My Db tells me that they are not sure of what to remove to return space me.

    Here is the error in the log of the FMS server.

    As I recall, if you go in the annexes, you can add a run now for the night and then monthly maintenance schedules and who should drop the bits of the database.

  • Foglight stop add for objects of topology for my period...

    Hello.

    I tested some agents customized for the follow-up of the specific requirements of the customer. Although agents have been adding data correctly to the SGF, they don't seem to be available depending on the Types of topology in the application of the scope of a rule.  Thus, I can browse the data browser and find the data of the last good agent.  However, they seem to be missing as a new Type of topology.  The funny thing is that everything seems to work well and I was testing the rules for one of my agent settings.  However, the Types of topology stopped adding, even when I tried has previously Setup to work under a new name.  Is it possible to debug this?  Thank you.

    KEH Yoe

    Hello.

    Looks like it was just a long delay until the new Types of topology have been added at the request of the scope of a rule.  When I returned to work the next day, they were all available.  Thank you.

    KEH Yoe

  • VM Ware topology objects update

    I have a question about changing the last property updated on an object of topology. I know how to write a groovy script to update a value on a VMW Cluster or VMW ESX Server object and submit the change via the topology service.  I asked to do this because our performance agent FMS & VMWare are not currently in.  Center virtual items have a last updated 4 days ago and other business process are check data and expected her to be with in the last 24 hours.

    Are there side effects not expected to force a change to the last updated date on the VM ware objects?

    Is it possible that this would stop collecting data reports before the last update? I'm afraid I'll create a set in data reported to Foglight by changing these data. Basically forcing the FMS to ignore all data prior to the new update

    Hi Ben,

    I think that the main issue is your VMware agent could have stopped collecting data or is not more data collection for this object. You can try to resolve this matter before you find a workaround (update manually)?

    Please communicate with our customer assistance service, create an SR and they should be able to determine why the object is not out of date.

    I hope this works

    Gaston.

  • import libraries/modules Groovy?

    Is it possible to use a Groovy library into the FMS to extend the functionality? I want to run an LDAP query to check the status of an AD object and then possibly send an email. I think I can do that by triggering a command or action of the remote control and then treat the query LDAP and e-mailing in the command action script. I was wondering if this could all be done in the FMS with Groovy and using the library groovy - ldap.jar.

    Thank you

    Kris

    Thanks to Stuart bath, an architect of Solutions of our Consulting Services for the answer.

    "Yes, it is possible. Place the JAR file in $FOGLIGHT_DIR\server\core\, then restart the FMS. The library will be available to the shell groovy inside the FMS. »

    Hope this helps

    Golan

Maybe you are looking for

  • Cannot restore iPhone 6 s more than 7

    so... got the new iphone 7 more today, no matter how many times I tried to restore it since the last backup, it failed at the last hurdle. Thought that I would try through iTunes and it said that 7 has not been run on the latest iOS? I also had to be

  • Problems burning discs with toast

    I have problems burning discs using toast. I had with my old Toast 10, and the problem persists despite an update of Toast Titanium 14, so I assume that the problem is with my mac and not the toast. This happens with all types of disks, but is less c

  • Name of file in the flash player

    Original title: my USB f my 8 GB USB key file name transcent is changed and have no extension, or it is not readable. How can I recover my files?

  • Incorrect time in system information

    Windows 7 - while in information system audit of Windows Error Reporting, the date for various errors is correct, but the time is still wrong by 4 hours. My system time in the taskbar is still correct, and it's really confusing. Any ideas anyone? Tha

  • Windows 7 download - language error unsupported

    I had to reinstall Windows 7.  Cannot find my original disk, but I have a downloaded SP1 ISO probably DigitalRiver.  However I'm having a lot of problems and need to reinstall and decided that the download of a new ISO standard would be a good idea.