@@ -1106,9 +1106,9 @@ admin_host_set_status
11061106Description
11071107~~~~~~~~~~~
11081108
1109- A stat to track status is created for each host. The name is the host fqdn with a prefix of ` proxy.process.host_status `. The value of
1110- the stat is a string which is the serialized representation of the status. This contains the overall status and the status for each reason.
1111- The stats may be viewed using the `admin_lookup_records `_ rpc api or through the `` stats_over_http `` endpoint .
1109+ A record to track status is created for each host. The name is the host fqdn.
1110+ This record contains the overall status and the status for each reason.
1111+ The records may be viewed using the `admin_host_get_status ` rpc api.
11121112
11131113Parameters
11141114~~~~~~~~~~
@@ -1204,11 +1204,8 @@ Response:
12041204 Getting the host status
12051205~~~~~~~~~~~~~~~~~~~~~~~
12061206
1207- Get the current status of the specified hosts with respect to their use as targets for parent selection. This returns the same
1208- information as the per host stat.
1209-
1210- Although there is no specialized API that you can call to get a status from a particular host you can work away by pulling the right records.
1211- For instance, the ``host1 `` that we just set up can be easily fetch for a status:
1207+ Get the current status of the specified hosts with respect to their use as targets for parent selection. This returns the serialized
1208+ information for the host.
12121209
12131210Request:
12141211
@@ -1218,11 +1215,10 @@ Request:
12181215 {
12191216 "id" : " ded7018e-0720-11eb-abe2-001fc69cc946" ,
12201217 "jsonrpc" : " 2.0" ,
1221- "method" : " admin_lookup_records" ,
1222- "params" : [{
1223- "record_name" : " proxy.process.host_status.host1"
1224- }
1225- ]
1218+ "method" : " admin_host_get_status" ,
1219+ "params" : [
1220+ " host1.mycdn.net"
1221+ ]
12261222 }
12271223
12281224 Response:
@@ -1234,23 +1230,11 @@ Response:
12341230 "jsonrpc" : " 2.0" ,
12351231 "id" : " ded7018e-0720-11eb-abe2-001fc69cc946" ,
12361232 "result" : {
1237- "recordList" : [{
1238- "record" : {
1239- "record_name" : " proxy.process.host_status.host1" ,
1240- "record_type" : " 3" ,
1241- "version" : " 0" ,
1242- "raw_stat_block" : " 0" ,
1243- "order" : " 1134" ,
1244- "stat_meta" : {
1245- "persist_type" : " 1"
1246- },
1247- "record_class" : " 2" ,
1248- "overridable" : " false" ,
1249- "data_type" : " STRING" ,
1250- "current_value" : " HOST_STATUS_UP,ACTIVE:UP:0:0,LOCAL:UP:0:0,MANUAL:UP:0:0,SELF_DETECT:UP:0" ,
1251- "default_value" : " HOST_STATUS_UP,ACTIVE:UP:0:0,LOCAL:UP:0:0,MANUAL:UP:0:0,SELF_DETECT:UP:0"
1233+ "statusList" : [{
1234+ "hostname" : " host1.mycdn.net" ,
1235+ "status" : " HOST_STATUS_DOWN,ACTIVE:UP:0:0,LOCAL:UP:0:0,MANUAL:UP:0:0,SELF_DETECT:DOWN:1646248306"
12521236 }
1253- } ]
1237+ ]
12541238 ,"errorList" :[]
12551239 }
12561240 }
0 commit comments