Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cloud_Computing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Tim Hobelsberger
Cloud_Computing
Commits
d909df0e
Commit
d909df0e
authored
2 years ago
by
Markus Klose
Browse files
Options
Downloads
Patches
Plain Diff
Node-exporter first steps
parent
813a5f2b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docker-compose.yaml
+33
-0
33 additions, 0 deletions
docker-compose.yaml
index.js
+9
-9
9 additions, 9 deletions
index.js
prometheus/prometheus.yml
+14
-2
14 additions, 2 deletions
prometheus/prometheus.yml
with
56 additions
and
11 deletions
docker-compose.yaml
+
33
−
0
View file @
d909df0e
version
:
'
3'
networks
:
monitor
:
driver
:
bridge
services
:
node-exporter
:
image
:
prom/node-exporter:latest
container_name
:
node-exporter
ports
:
-
9100:9100
restart
:
unless-stopped
volumes
:
-
/proc:/host/proc:ro
-
/sys:/host/sys:ro
-
/:/rootfs:ro
command
:
-
'
--path.procfs=/host/proc'
-
'
--path.rootfs=/rootfs'
-
'
--path.sysfs=/host/sys'
-
'
--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
expose
:
-
9100
deploy
:
mode
:
global
networks
:
-
monitor
prometheus
:
image
:
prom/prometheus:latest
container_name
:
prometheus
...
...
@@ -14,6 +40,8 @@ services:
restart
:
unless-stopped
command
:
-
"
--config.file=/etc/prometheus/prometheus.yml"
networks
:
-
monitor
grafana
:
image
:
grafana/grafana:latest
...
...
@@ -32,6 +60,9 @@ services:
-
27017:27017
volumes
:
-
mongodb:/data/db
networks
:
-
monitor
node
:
restart
:
always
...
...
@@ -46,6 +77,8 @@ services:
-
mongodb
environment
:
WAIT_HOSTS
:
mongodb:27017
networks
:
-
monitor
volumes
:
mongodb
:
...
...
This diff is collapsed.
Click to expand it.
index.js
+
9
−
9
View file @
d909df0e
...
...
@@ -76,22 +76,22 @@ const messageGroup = new client.Counter({
name
:
'
node_message_counter_Group
'
,
help
:
'
Counts the amount of times group message is used
'
});
const
clientActiveUsers
=
new
client
.
Gauge
({
name
:
'
node_active_users
'
,
help
:
'
Active Users
'
});
});
const
successfullLogIns
=
new
client
.
Counter
({
name
:
'
node_successful_logins
'
,
help
:
'
Successfull LogIns total
'
});
});
global
.
SUCCESSFULLLOG
=
successfullLogIns
;
const
notSuccessfullLogIns
=
new
client
.
Counter
({
name
:
'
node_not_successful_logins
'
,
help
:
'
Not successfull LogIns total
'
});
});
global
.
NOTSUCCESSFULLLOG
=
notSuccessfullLogIns
;
const
audioFileCounter
=
new
client
.
Counter
({
...
...
@@ -178,8 +178,8 @@ io.on('connection', (socket) => {
/**
* Summary:
* Function to add a user to map of users, who are currently online.
* Summary:
* Function to add a user to map of users, who are currently online.
*
* Description:
* Function will take the username from response and append it together with the socketID to map activeUsers.
...
...
@@ -314,7 +314,7 @@ io.on('connection', (socket) => {
sender
:
sender
,
receiver
:
receiver
,
dateTime
:
dateTime
})
})
return
0
;
}
}
...
...
@@ -341,7 +341,7 @@ io.on('connection', (socket) => {
* @listens socket.on() 'groupMessage' event
*/
socket
.
on
(
'
groupMessage
'
,
(
response
)
=>
{
messageCounterIn
.
inc
(
1
);
messageGroup
.
inc
(
1
);
...
...
@@ -422,7 +422,7 @@ io.on("connection", (socket) => {
io
.
emit
(
'
video
'
,
file
);
});
});
/**
* Summary:
* Function for sending audio files
...
...
This diff is collapsed.
Click to expand it.
prometheus/prometheus.yml
+
14
−
2
View file @
d909df0e
...
...
@@ -14,5 +14,17 @@ scrape_configs:
scrape_interval
:
5s
# scheme: https
static_configs
:
-
targets
:
[
'
192.168.0.230:5000'
]
\ No newline at end of file
-
targets
:
[
'
192.168.178.45:5000'
]
-
job_name
:
'
node-exporter'
honor_labels
:
true
scrape_interval
:
5s
# scheme: https
static_configs
:
-
targets
:
[
'
node-exporter:9100'
]
#remote_write:
#- url: "localhost:3000"
# basic_auth:
# username: "admin"
# password: "admin"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment