Hi guys, first of all thank you for your help.
So I got a basic requirement. I'm building a Java Swing app that displays a popup notification whenever a server is down.
I'm able to retrieve the authentification token no problems whatsoever, and I think I'm also able to query the host.get for hostid. Here is my query and what is returned:
{
"jsonrpc": "2.0",
"method": "host.get",
"params": { "output": ["hostid"], "selectParentTemplates": [ "templateid", "name" ] },
"auth": "7dc4d4850a00ee95e5aae9ae291c7999",
"id": "5"
}
{"jsonrpc":"2.0","result":[{"parentTemplates":[],"hostid":"10051"},{"parentTemplates":[],"hostid":"10052"},{"parentTemplates":[],"hostid":"10054"},{"parentTemplates":[],"hostid":"10056"},{"parentTemplates":[],"hostid":"10017"},{"parentTemplates":[],"hostid":"10055"}],"id":"5"}
I have played with the query but I just cannot get the list of names and the status.
If anybody can help me. Please also find attached the current configuration I'm facing.
So I got a basic requirement. I'm building a Java Swing app that displays a popup notification whenever a server is down.
I'm able to retrieve the authentification token no problems whatsoever, and I think I'm also able to query the host.get for hostid. Here is my query and what is returned:
{
"jsonrpc": "2.0",
"method": "host.get",
"params": { "output": ["hostid"], "selectParentTemplates": [ "templateid", "name" ] },
"auth": "7dc4d4850a00ee95e5aae9ae291c7999",
"id": "5"
}
{"jsonrpc":"2.0","result":[{"parentTemplates":[],"hostid":"10051"},{"parentTemplates":[],"hostid":"10052"},{"parentTemplates":[],"hostid":"10054"},{"parentTemplates":[],"hostid":"10056"},{"parentTemplates":[],"hostid":"10017"},{"parentTemplates":[],"hostid":"10055"}],"id":"5"}
I have played with the query but I just cannot get the list of names and the status.

If anybody can help me. Please also find attached the current configuration I'm facing.
hopefully someone else can help.
Comment