Quantcast
Channel: Spiceworks Community
Viewing all articles
Browse latest Browse all 18

Where is the Service State in SpiceWorks API?

$
0
0

I'm writing a widget to monitor specific services on several machines (30 license services across 5 machines), and I'm trying to figure out where in the SpiceWorks API the data about service states are held.

I was able to locate a single service and I was looking at the properties of the object to try to find service state, here's where I've gotten so far..

var services = SPICEWORKS.data.Device.find('all', {hostname:'licenseserver1', method:'services'});
    var y;
    var z;
    var x = 1;
    var out='
'; for (y in services) { if(isNaN(y)) // If y isn't a service, I don't care to hear about it { break; } else { out = out + ""; // Setting up an HTML table for output for (z in services[y]) // Property list of a specific service { out = out + "" + ""; } out = out + ""; } } element.innerHTML = out;
" + y + "
" + z + "" + services[y][z] + "

Viewing all articles
Browse latest Browse all 18

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>