Forum Discussion

Lewis_Beard's avatar
2 years ago

How to exclude resources in a Resource Group report?

I have an Interface Bandwidth report, which targets a Resource Group specified like this: /Lv1/Lv2/Network Devices/

I checked the examples here: https://www.logicmonitor.com/support/terminology-syntax/glob-expressions

But all of those at the bottom show examples about how to filter out subgroups or etc. None of those examples interact with the actual resources.

So I tried switching my report to a Resource Report instead, and I made the attempt to specify my Resource with one of these 2 methods, in the hope that I could use clobs to eliminate the servers I dont want:

      Customers/PRIORITY ONE BANK/Network Devices*

      Customers/PRIORITY ONE BANK/Network Devices/*

I tried this because I was hoping to do something like this:

      Customers/PRIORITY ONE BANK/Network Devices/!(server1|server2)

But even without the server specification, if I use Customers/PRIORITY ONE BANK/Network Devices* or Customers/PRIORITY ONE BANK/Network Devices/* I get a report with no data.

I looked around to see if I could filter in the report based on a custom property that I set on devices, so I could just manage it there, and I didnt see an option for that either. I swore I had seen property filtering on a report somewhere but I dont see it.

 

So I guess I'm wondering, how exactly do I made a report, such as an Interface report, run against all the resources in a group, but exclude one or two servers?

 

 

1 Reply

  • Anonymous's avatar
    Anonymous
    54 minutes ago, Lewis Beard said:

    Customers/PRIORITY ONE BANK/Network Devices*

          Customers/PRIORITY ONE BANK/Network Devices/*

    The difference between these two is just that the first will match on any children of "Customers/PRIORITY ONE BANK" where the name starts with "Network Devices"

    The second will match any children of "Customers/PRIORITY ONE BANK/Network Devices" no matter what the child group name is.

    As you're testing out your filter, I'd use a "Resource Group Inventory" report. Some of the other groups require you to specify datasources and instances, which play into the filter and may explain why you're getting no data when using the simple filters i quoted here.

    That said, I've not seen (and I just tried a few ways i supposed might have worked and failed) a way to exclude certain objects the way you're doing it. 

    This is why I usually recommend an independent group structure for reporting/dashboarding. What I mean is, create a group with those resources minus those two servers and focus the report on that new group. It shifts the logic from the report to the group. You can create the group manually (ugh) or dynamically. What makes those two servers different? Could you tag those two servers with a property, then get all servers without that property (or without a value of false)? If the original group is a static group, you should be able to use system.staticgroups like this: 

    join(system.staticgroups,",") =~ "Customers/PRIORITY ONE BANK/Network Devices" && !includeInReport == "false"

    If the original group is a dynamic group, just append the following to the original group's rule to make the appliesto for the new dynamic group:

    <<original group's appliesto>> && !includeInReport == "false"

    Just add a property called "includeInReport" to server1 and server2 with a value of "false".