Node Statistics¶
Supported Versions | Last Updated |
---|---|
1.2.00 & higher json output 1.14.00 & higher |
2014/01/30 |
Action | node-statistics |
---|---|
Method | GET, POST |
Variables | nodeid [node id or name] rdtype [json] For json output specify json or for default output leave blank. This variable is optional |
Example Output | XMLSuccess: <status>success</status> <statusmsg></statusmsg> <id>[node id]</id> <virt>[openvz|xen|kvm]</virt> <name>[node name]</name> <ip>[ipaddress]</ip> <hostname>[hostname]</hostname> <country>[country]</country> <city>[city]</city> <sshport>[sshport]</sshport> <arch>[arch]</arch> <freememory>[free memory]</freememory> <freedisk>[free diskspace in the default VG for KVM/Xen, for OpenVZ - in /vz partition]</freedisk> <virtualservers>[number of virtual servers]</virtualservers> <freeips>[number of free ips]</freeips> <freeipv6subnets>[number of free ipv6 subnets]</freeipv6subnets> <allocatedmemory>[amount of memory allocated to virtual servers]</allocatedmemory> <allocatedbandwidth>[amount of bandwidth allocated to virtual servers]</allocatedbandwidth> <memorylimit>[the max memory of the node]</memorylimit> <freeipv6>[amount of free ipv6]</freeipv6> <nodegroupid>[the id of the node group]</nodegroupid> <nodegroupname>[the name of the node group]</nodegroupname> <disklimit>[the max disk space of the node]</disklimit> Error: <status>error</status> <statusmsg>ERROR MESSAGE</statusmsg> JSONSuccess: { "status":"success", "statusmsg":"", "id":"9", "virt":"openvz", "name":"Node2", "ip":"123.123.123.123", "memorylimit":415834112, "disklimit":89070272512, "hostname":"node2.domain.com", "country":"UK", "city":"London", "sshport":"22", "arch":"x86_64", "freememory":"3572736", "allocatedmemory":7213056, "allocatedbandwidth":503316480, "freedisk":"800522240", "freeipv6":"400", "freeipv6subnets":"10", "nodegroupid":"1", "nodegroupname":"groupname", "virtualservers":11, "freeips":33 } Note: output field "freedisk" can contain string error message for OpenVZ. JSON example: { "status": "success", "statusmsg": "", "id": "54", "nodegroupid": "6", "nodegroupname": "OpenVZ", "virt": "openvz", "name": "snovz1", "ip": "10.54.1.117", "memorylimit": 10240000, "disklimit": 1024000000, "hostname": "node2.domain.com", "country": "", "city": "", "sshport": "22", "arch": "x86_64", "freememory": null, "allocatedmemory": 0, "allocatedbandwidth": 0, "freedisk": "Failed to get available disk space in /vz: no such file or directory",> "virtualservers": 0, "freeips": 2, "freeipv6": 0, "freeipv6subnets": 0 } Error: {"status":"error","statusmsg":"ERROR MESSAGE"} |