Commit 8b66e7a7 by root

Swap and BootTime

parent 0033a64a
...@@ -14,8 +14,8 @@ Pass = guest ...@@ -14,8 +14,8 @@ Pass = guest
[Metrics] [Metrics]
cpuUsage = True cpuUsage = True
memoryUsage = True memoryUsage = True
userCount = False userCount = True
swapUsage = False swapUsage = True
systemBootTime = False systemBootTime = True
packageTraffic = False packageTraffic = True
dataTraffic = False dataTraffic = False
...@@ -18,8 +18,7 @@ def importConf(path_to_file): ...@@ -18,8 +18,7 @@ def importConf(path_to_file):
metrics["user.count"] = config.get("Metrics", "userCount") metrics["user.count"] = config.get("Metrics", "userCount")
metrics["swap.usage"] = config.get("Metrics", "swapUsage") metrics["swap.usage"] = config.get("Metrics", "swapUsage")
metrics["system.boot_time"]= config.get("Metrics", "systemBootTime") metrics["system.boot_time"]= config.get("Metrics", "systemBootTime")
metrics["package.traffic"] = config.get("Metrics", "packageTraffic") metrics["network"] = config.get("Metrics", "dataTraffic")
metrics["data.traffic"] = config.get("Metrics", "dataTraffic")
except configparser.NoSectionError: except configparser.NoSectionError:
print("Config file contains error! Reason: Missing section.") print("Config file contains error! Reason: Missing section.")
raise raise
......
No preview for this file type
...@@ -5,11 +5,13 @@ class collectables: ...@@ -5,11 +5,13 @@ class collectables:
__collectables = { __collectables = {
std.cpu.usage.name: [std.cpu.usage], std.cpu.usage.name: [std.cpu.usage],
std.memory.usage.name: [std.memory.usage], std.memory.usage.name: [std.memory.usage],
std.swap.usage.name: [std.swap.usage],
std.user.count.name: [std.user.count], std.user.count.name: [std.user.count],
std.network.packages_sent.name: [std.network.packages_sent], std.network.packages_sent.name: [std.network.packages_sent],
std.network.packages_received.name: [std.network.packages_received], std.network.packages_received.name: [std.network.packages_received],
std.network.bytes_sent.name: [std.network.bytes_sent], std.network.bytes_sent.name: [std.network.bytes_sent],
std.network.bytes_received.name: [std.network.bytes_received], std.network.bytes_received.name: [std.network.bytes_received],
std.system.boot_time.name: [std.system.boot_time],
"network": [std.network.bytes_sent, "network": [std.network.bytes_sent,
std.network.bytes_received, std.network.bytes_received,
std.network.packages_sent, std.network.packages_sent,
......
No preview for this file type
...@@ -47,6 +47,12 @@ class std (Collection): ...@@ -47,6 +47,12 @@ class std (Collection):
collector_function = ps.virtmem_usage collector_function = ps.virtmem_usage
collector_function_result_attr = "percent" collector_function_result_attr = "percent"
class swap (Collection.Group):
class usage(Collection.Group.Metric):
name = "swap.usage"
collector_function = ps.swap_memory
collector_function_result_attr = "percent"
class user (Collection.Group): class user (Collection.Group):
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment