Web Reports Search

(imported topic written by jl197391)

Looking to modify this code that searches for a computer by computername to one that searches by IP address. Any suggestions on doing this without using filters?

Find computer:

-Thanks

(imported comment written by BenKus)

Hi jl1973,

Unfortunately, this won’t work for you… Searching by computer name is built into web reports and it can’t be customized to instead use “ip address”…

You could create a custom report to do this, but you would need to write the javascript to take an input and then try to match it to computers… here is the session relevance to do something like this:

(names of it, concatenation ", " of (ip addresses of it as string)) of bes computers whose (exists ip address whose (it as string contains “192.168”) of it)

You can replace the IP address fragment and test this in http://YourWebReportsURL/webreports?page=QNA

To make a full report, you will need to create a custom report, and deal with substituting the input box in javascript and format the results… here is a fragment of the javascript code:

// get the IP Address in some HTML/javascript code you need to write
var IPaddress;
var results = EvaluateRelevance(’(names of it, concatenation ", " of (ip addresses of it as string)) of bes computers whose (exists ip address whose (it as string contains "’ + IPaddress + ") of it)’);

// display the results as you want…

Ben