3 Replies Latest reply on Jul 8, 2016 5:43 PM by Josejulio Martínez

    Edit alert definition through cli

    karthik raj Novice

      Hello All,

       

      I want to edit the alert definition through CLI.

      For ex:I want to change the threshold  from "threshold=12.0" to some value.Is it possible through cli.Please assist

       

      Example :

      ========

      AlertDefinitionManager.getAlertDefinition(10236)

      AlertDefinition:

             alertDampening: org.rhq.core.domain.alert.AlertDampening[ category=NONE[] ]

        alertDampeningEvents:

         alertNotifications: []

                     alerts:

        conditionExpression: ANY

                 conditions: [org.rhq.core.domain.alert.AlertCondition[ id=10269, category=Measurement Threshold, name=Bytes Received, comparator='<', threshold=12.0, option=null ]]

                    context: Group

            controlFiltered: false

                      ctime: 1467095090327

                    deleted: false

                description: test

                    enabled: true

                      group: ResourceGroup[id=10166, name=Unstable_KB_Tier ( Network Adapter ), category=COMPATIBLE, type=Network Adapter, isDynaGroup=false, isClusterGroup=false]

        groupAlertDefinition:

                         id: 10236

                      mtime: 1467095090327

                       name: test

             notifyFiltered: false

                   parentId: 0

                   priority: Medium

                   readOnly: false

                 recoveryId: 0

                   resource:

              resourceGroup: ResourceGroup[id=10166, name=Unstable_KB_Tier ( Network Adapter ), category=COMPATIBLE, type=Network Adapter, isDynaGroup=false, isClusterGroup=false]

               resourceType:

                willRecover: false