Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
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
...
@@ -14,8 +14,8 @@ Pass = guest
[
Metrics
]
[
Metrics
]
cpuUsage
=
True
cpuUsage
=
True
memoryUsage
=
True
memoryUsage
=
True
userCount
=
Fals
e
userCount
=
Tru
e
swapUsage
=
Fals
e
swapUsage
=
Tru
e
systemBootTime
=
Fals
e
systemBootTime
=
Tru
e
packageTraffic
=
Fals
e
packageTraffic
=
Tru
e
dataTraffic
=
False
dataTraffic
=
False
src/cnfparse.py
View file @
8b66e7a7
...
@@ -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
...
...
src/cnfparse.pyc
View file @
8b66e7a7
No preview for this file type
src/collectables.py
View file @
8b66e7a7
...
@@ -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
,
...
...
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):
...
@@ -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
):
...
...
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