cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 12

Find me my site, if it's maxed, and who's maxing it out!

Hi All,

I'm trying to achieve a thing, i've got some of the parts for a solution, but I'm in need of some advice.

I've got some local engineers who want to be able to quickly look up two resources: An Interface Utilisation chart and a Netflow chart for said interface

I'd like them to get to that as quickly as possible

They know some names and location details for their sites, but not necessarily the router name or the useful interface name

I've put a few custom properties in so that between n.customproperties.city, n.customproperties.location2, and n.location I can probably return the right site from a custom query.

I can generally filter to the main site router easily enough by n.caption format

I can generally filter to the correct interface by name format, or interface type + the highest utilisation. (Though I'm looking to nail down the best method)

This means I can make a custom query that will take the input of some location details, and probably spit out the interface ID. I should be able to stick that into some custom HTML to generate these two charts on-demand.

I'm not adverse to another click or two, but I'd prefer to stay on the page if possible.

I've got a few elements already which use a CustomHTML element to query solarwinds and display a result, but I'm mostly bodging together bits of other people's code with my own SWQL

How can I pull an SLW chart or two on command, in a web element, off a search?

I've tried to get some customhtml into a customquery element and that doesnt look like it works. So I guess my route involves the customhtml element, and something like this:

"

<script>

var swql="SELECT [whatever the eventual query is] WHERE xxxx like ''%[Some search string variable]%'"

var params = JSON.stringify({

query: swql,

parameters: {

}

});

$.ajax({

type: 'POST',

url: '/Orion/Services/Information.asmx/QueryWithParameters',

data: params,

contentType: "application/json; charset=utf-8",

dataType: "json",

success: function(response) {

...

"

How do I get a search string in there?

How to I take the response variable and put it back into an <img src=" bracket, or similar?

Is there just an easier way?

Labels (1)
0 Kudos
2 Replies

Do you always want to see the same Information just using the specific NodeID? I’m on the train at the moment so maybe I misread but my initial thoughts would be to create a custom query table where they search the Node etc but in the query you add a LinkFor URL for a custom view, which means the results will present a hyperlink that takes them to a detail view based on the NodeID variable which then loads the predefined widgets regardless of which node they choose.

- David Smith
0 Kudos

Hi dgsmith80,

Same information each time is fine - I was thinking of hardcoding the chart settings in as part of the URL

I've never been sure how the "LinkFor" stuff actually works though i've used them from other's code before, Not sure if the hyperlink presented there can be edited, the view it would link to as default has some of the information i'm after but a click and a scroll away.

Ideally I'd like to present the charts images/elements themselves, not a link to them - ie the answer presented on the same page

0 Kudos