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?