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..

JavaScript
varservices=SPICEWORKS.data.Device.find('all',{hostname:'licenseserver1',method:'services'});vary;varz;varx=1;varout='';for(yinservices){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 outputfor(zinservices[y])// Property list of a specific service{out=out+""+"";}out=out+"";}}element.innerHTML=out;

This topic first appeared in the Spiceworks Community
"+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>