Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
monitor-client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8b66e7a7
authored
Oct 10, 2013
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Swap and BootTime
parent
0033a64a
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
6 deletions
+13
-6
config/client.conf
+4
-4
src/cnfparse.py
+1
-2
src/cnfparse.pyc
+0
-0
src/collectables.py
+2
-0
src/collectables.pyc
+0
-0
src/metrics.py
+6
-0
src/metrics.pyc
+0
-0
No files found.
config/client.conf
View file @
8b66e7a7
...
...
@@ -14,8 +14,8 @@ Pass = guest
[
Metrics
]
cpuUsage
=
True
memoryUsage
=
True
userCount
=
Fals
e
swapUsage
=
Fals
e
systemBootTime
=
Fals
e
packageTraffic
=
Fals
e
userCount
=
Tru
e
swapUsage
=
Tru
e
systemBootTime
=
Tru
e
packageTraffic
=
Tru
e
dataTraffic
=
False
src/cnfparse.py
View file @
8b66e7a7
...
...
@@ -18,8 +18,7 @@ def importConf(path_to_file):
metrics
[
"user.count"
]
=
config
.
get
(
"Metrics"
,
"userCount"
)
metrics
[
"swap.usage"
]
=
config
.
get
(
"Metrics"
,
"swapUsage"
)
metrics
[
"system.boot_time"
]
=
config
.
get
(
"Metrics"
,
"systemBootTime"
)
metrics
[
"package.traffic"
]
=
config
.
get
(
"Metrics"
,
"packageTraffic"
)
metrics
[
"data.traffic"
]
=
config
.
get
(
"Metrics"
,
"dataTraffic"
)
metrics
[
"network"
]
=
config
.
get
(
"Metrics"
,
"dataTraffic"
)
except
configparser
.
NoSectionError
:
print
(
"Config file contains error! Reason: Missing section."
)
raise
...
...
src/cnfparse.pyc
View file @
8b66e7a7
No preview for this file type
src/collectables.py
View file @
8b66e7a7
...
...
@@ -5,11 +5,13 @@ class collectables:
__collectables
=
{
std
.
cpu
.
usage
.
name
:
[
std
.
cpu
.
usage
],
std
.
memory
.
usage
.
name
:
[
std
.
memory
.
usage
],
std
.
swap
.
usage
.
name
:
[
std
.
swap
.
usage
],
std
.
user
.
count
.
name
:
[
std
.
user
.
count
],
std
.
network
.
packages_sent
.
name
:
[
std
.
network
.
packages_sent
],
std
.
network
.
packages_received
.
name
:
[
std
.
network
.
packages_received
],
std
.
network
.
bytes_sent
.
name
:
[
std
.
network
.
bytes_sent
],
std
.
network
.
bytes_received
.
name
:
[
std
.
network
.
bytes_received
],
std
.
system
.
boot_time
.
name
:
[
std
.
system
.
boot_time
],
"network"
:
[
std
.
network
.
bytes_sent
,
std
.
network
.
bytes_received
,
std
.
network
.
packages_sent
,
...
...
src/collectables.pyc
View file @
8b66e7a7
No preview for this file type
src/metrics.py
View file @
8b66e7a7
...
...
@@ -47,6 +47,12 @@ class std (Collection):
collector_function
=
ps
.
virtmem_usage
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
):
...
...
src/metrics.pyc
View file @
8b66e7a7
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment