Skip to main content

Hi, I'm trying to create a filter in a Widget but I don't know if it's possible.

I have several Hostrgroups

For example:

Client1
Client1-Database-SQL
Client1-Database-DB2
Client1-Database-MSSQL
Client2
Client2-Database-SQL
Client2-Database-DB2
Client2-Database-MSSQL
Client3
Client3-Database-SQL
Client3-Database-DB2
Client3-Database-MSSQL

I only want the hostgroups Client1 and Client2 to appear in the list

 

 

The result is all hostgroups starting with Client1 and Client2

can you help me?

Thanks

Hello @carnabil ,
try this :

Client[1,2]
 

You can use this site https://regex101.com/ for help you with regex


Thanks for the reply

The Client1, Client2 thing was just an example. It can be substituted for any name like ACME, MERIDIAN, SUSTRAN, ... In short, two different names


Ahah sorry @carnabil ,

if you just want to have client1 and client2, just add a $ at the end of your word. regex will understand that you don't want anything after your word. FYI, if you want to do the same thing but for before your word, you have to use a ^

solution of your case: Client1$|Client2$


It works perfectly. Thank you very much for the help


Reply