-
Incident report
-
Resolution: Cannot Reproduce
-
Blocker
-
None
-
1.9.9 (beta)
-
None
-
RHEL 5
Java 1.6
I am trying to create group, host, application and items. From the documentation 2.0, I am unable to create items. Here is the link for doc http://www.zabbix.com/documentation/2.0/manual/appendix/api/item/create
Here is what I am sending
2012-03-02 10:27:32,479 [main] TRACE com.sabre.zabbix.util.ZabbixApiUtil - Writing json command {
"jsonrpc" : "2.0",
"method" : "item.create",
"params" :
,
"id" : "2",
"auth" : "ec1135440d2b385edcbecffe8a14f074"
}
2012-03-02 10:27:32,494 [main] TRACE com.sabre.zabbix.util.ZabbixApiUtil - Received json response {
"jsonrpc" : "2.0",
"error" :
,
"id" : "2"
}
I also not able to get the application id correctly with application.get eventhough it is finding the application.exists. I am able to see in the Zabbix Server dashboard.
public static String[] getAppNameIds(String url, String authId, String[] appNames){
JsonGenerator jg = null;
try{
StringWriter sw = new StringWriter();
jg = writePrefix(sw, "application.get");
jg.writeFieldName("search");
jg.writeStartArray();
for(String appName : appNames)
jg.writeEndArray();
jg.writeStringField("output", "extend");
writePostfix(jg, "2", authId);
String json = sw.toString();
String rc = ZabbixApiUtil.sendCommand(url, json);
return (String[]) getRepeatingObjectValue(rc, "result", "applicationid");
}catch(Exception e)
finally
{ cleanup(jg); } }
The result doesn't have my application from the list.
Thanks
Jawed