1、 获得认证密钥
auth user and password
data = json.dumps(
{
"jsonrpc": "2.0",
"method": "user.login",...hostgroup.get",
"params":{
"output":["groupid","name"],
},
"auth":"key", # theauth id is what auth script...params":{
"output":["hostid","name"],
"groupids":"14",
},
"auth":"key", # theauth id is what auth script...extend",
"history":3,
"itemids":"25159",
"limit":10
},
"auth":"key", # theauth id is what auth script...extend",
"history":3,
"itemids":"25159",
"limit":1
},
"auth":"key", # theauth id is what auth script