Skip to content

Commit

Permalink
Harmonized DeviceConfiguration and MonitoringData; #5
Browse files Browse the repository at this point in the history
Refactored "hardware" and "resources" sections in "DeviceConfiguration"
and "MonitoringData", which are now compatible and can be mixed if
needed.
  • Loading branch information
nemesifier committed Dec 27, 2014
1 parent 93f53b3 commit 10fe26b
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 50 deletions.
1 change: 1 addition & 0 deletions README.rst
Expand Up @@ -95,6 +95,7 @@ The object should be composed of the following members:
* ``general``
* ``hardware``
* ``operating_system``
* ``resources``
* ``interfaces``
* ``physical_devices``
* ``routing_protocols``
Expand Down
24 changes: 19 additions & 5 deletions examples/device-configuration.json
Expand Up @@ -8,11 +8,8 @@
"hardware": {
"manufacturer": "Example inc.",
"model": "Example model",
"model_revision": 1,
"ram": 67108864,
"cpu": "Atheros AR2317",
"cpu_frequency": 400000000,
"flash_memory": 8388608
"revision": 1,
"cpu": "Atheros AR2317"
},
"operating_system": {
"name": "OpenWRT",
Expand All @@ -21,6 +18,23 @@
"revision": "r43321",
"description": "OpenWrt Barrier Breaker 14.07"
},
"resources": {
"memory": {
"total": 67108864
},
"swap": {
"total": 0
},
"cpu": {
"frequency": 400000000
},
"flash": {
"total": 8388608
},
"storage": {
"total": null
}
},
"interfaces": [
{
"type": "wireless",
Expand Down
99 changes: 54 additions & 45 deletions examples/monitoring-data.json
Expand Up @@ -4,6 +4,59 @@
"local_time": 1414305354,
"uptime": 3501937,
},
"resources": {
"load_average": [
"0.08",
"0.04",
"0.05"
],
"memory": {
"total": 67108864,
"free": 3156,
"buffered": 2072,
"cache": 6884
},
"swap": {
"total": 0,
"free": 0
},
"connections": {
"ipv4": {
"tcp": 4,
"udp": 18
},
"ipv6": {
"tcp": 2,
"udp": 1
}
},
"processes": {
"running": 2,
"sleeping": 36,
"blocked": 0,
"zombie": 0,
"stopped": 0,
"paging": 0
},
"cpu": {
"frequency": 400000000,
"user": 13,
"system": 0,
"nice": 4,
"idle": 83,
"iowait": 0,
"irq": 0,
"softirq": 0
},
"flash": {
"total": 8388608,
"free": 1388608,
},
"storage": {
"total": null,
"free": null,
}
},
"interfaces": [
{
"name": "lo",
Expand Down Expand Up @@ -92,49 +145,5 @@
"tx_carrier_errors": 0
}
}
],
"resources": {
"load_average": [
"0.08",
"0.04",
"0.05"
],
"memory": {
"total": 28980,
"free": 3156,
"buffered": 2072,
"cache": 6884
},
"swap": {
"total": 0,
"free": 0
},
"connections": {
"ipv4": {
"tcp": 4,
"udp": 18
},
"ipv6": {
"tcp": 2,
"udp": 1
}
},
"processes": {
"running": 2,
"sleeping": 36,
"blocked": 0,
"zombie": 0,
"stopped": 0,
"paging": 0
},
"cpu": {
"user": 13,
"system": 0,
"nice": 4,
"idle": 83,
"iowait": 0,
"irq": 0,
"softirq": 0
}
}
]
}

0 comments on commit 10fe26b

Please sign in to comment.