-
1. Re: Dynagroups and Alert Definitions; RHQ 4.4
lkrejci Aug 9, 2012 3:00 AM (in response to genman)What do you mean by "alert definitions that work with dynagroups"?
If you have a dynagroup, you can create alert defs on it. Granted, I just checked only on my 4.5.0-SNAPSHOT build, but I don't think there's been anything new in this area in the last couple of versions.
Now if you wanted something like alert def "templates" for groups - i.e. something along the lines of "if there happens to be a group with this type of definition, I want to automatically create these alert defs on it, thank you" - then yeah, that's unfortunately not possible. I actually like the idea a lot, because it nicely complements our existing alert def templates that are only available on a resource type level (i.e. you can say "for any resource of this type, I want these alert defs automatically created").
I've tried searching bugzilla but I couldn't find any similar request. Would you mind creating one (here) and lay out in detail what would you expect from such a feature?
Thanks, Lukas
-
2. Re: Dynagroups and Alert Definitions; RHQ 4.4
genman Aug 9, 2012 3:50 AM (in response to lkrejci)Forgive me.
This was my definition:
resource.type.plugin = flume
resource.type.name = Flume Channel
resource.name = 'Flume Channel agent-channel'
and this somehow got my dynagroup defined as a 'mixed' group. So it prevented me from creating the alert definition like I thought it should. (Not sure why it became 'mixed' anyway.)
Changing it to:
resource.type.plugin = flume
resource.type.name = Flume Channel
resource.name.contains = 'agent-channel'
worked.
I do like your idea but it wasn't really at all what I needed.
Something I'd like to have though is being able to reuse alert definitions more generally. Since they are often fairly similar, it would be nice to have a text box where you can copy/paste a definition from one place to another, then tweak a parameter or two. I am probably going to rely on the CLI tool to actually set up the definitions. Especially since I have two RHQ installations and are copying them around.
-
3. Re: Dynagroups and Alert Definitions; RHQ 4.4
lkrejci Aug 9, 2012 4:22 AM (in response to genman)Unfortunately, RHQ's CLI is currently incapable of creating alert defs using the remote API/CLI. There's a long standing BZ for it https://bugzilla.redhat.com/show_bug.cgi?id=617202.
-
4. Re: Dynagroups and Alert Definitions; RHQ 4.4
genman Aug 9, 2012 10:47 AM (in response to lkrejci)So was this simply an oversight? It seems pretty straightforward to add to the AlertDefinitionManagerRemote interface:
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) public int createAlertDefinition(Subject subject, AlertDefinition alertDefinition, Integer resourceId) throws InvalidAlertDefinitionException; I could work a patch for this if it seems straightfoward, although it takes some time for me to get any patch approved through my company...