Advanced search

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
User avatar
chercen
Posts: 41
Joined: Sun Apr 09, 2006 4:16 pm
Location: Spain

Advanced search

Post by chercen »

Hi,

It would be great if we could do an advanced search when searching for devices or graphs. That is, now we can only search one string: "switch 1", or "win server", or "router"; it would be useful if we could search:

"procurve" OR "catalyst" => result= all procurve and catalyst switches
"site A" AND "switch" ==> result= switches installed in site A
"site A" AND NOT "catalyst" ==> result= switchs in site A, but not catalyst

I hope I have explained properly :-)

Regards,

Cesar
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

You may use "SQL wildcards" and other SQL query stuff within the search field. Wildcards are working, I'm using them often. Other operators should work, but I didn't check yet
Reinhard
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Because of string quoting, I don't think other operators will work.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
chercen
Posts: 41
Joined: Sun Apr 09, 2006 4:16 pm
Location: Spain

Post by chercen »

Thanks a lot! It works great....

lvm wrote:You may use "SQL wildcards" and other SQL query stuff within the search field. Wildcards are working, I'm using them often. Other operators should work, but I didn't check yet
Reinhard
mheacher1
Posts: 11
Joined: Sun May 27, 2007 7:06 am

Post by mheacher1 »

What is exactly the solution to make multiple search (with AND, OR)?
Give me an example for a query please. Because I intended with "AND", "&" "%" and other and nothing work.

Thanks for your reply
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

AND, OR are not supported. Cacti performs a LIKE operation, not a REGEXP operation. So wildcards only are supported (see http://dev.mysql.com/doc/refman/5.0/en/ ... rator_like)
% matches several characters
_ matches a single character
You may combine multiple wildcarding sequences, e.g.
host%- traf% bandwid%
Reinhard
seichimaru
Posts: 6
Joined: Mon Jul 02, 2007 8:19 pm
Contact:

filtering base on sub-tree

Post by seichimaru »

I just noticed that the filter by host is so limited. Could it be editted to filter by sub-tree in the preview mode?

NMS Devices
|____ nms1
|____ nms2
Wan Routers
|____ router1
|____ router2

If i check it in the preview mode, it only has filtering by host. I'm really not good in php.I want to see all the graphs under the Wan Router Tree. Pls. someone check it out if its possible to filter by sub-tree.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This is not possible ATM.
Reinhard
preart
Posts: 5
Joined: Sun Mar 06, 2016 3:22 pm

Re: Advanced search

Post by preart »

In version 1.1.5 it does not work.
% and _ does not return anything.
For example:
  • Traffic%lagg
    %cpu%
    CPU_Temp
Part of graph names:
  • ...Traffic - lagg0...
    ...- CPU Temp...
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Advanced search

Post by Osiris »

1.1.5 supports regular expressions. So, you can do the following on the graphs page:
(catalyst|cattlecar)
And both all matching items will show.
Before history, there was a paradise, now dust.
jtsmartins
Posts: 18
Joined: Thu Sep 22, 2016 4:25 am

Re: Advanced search

Post by jtsmartins »

Is it possible to perform, in the Cacti 0.8.8b version, a search similar to:
(catalyst|cattlecar)
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Advanced search

Post by Osiris »

In 1.x, yes
Before history, there was a paradise, now dust.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests