Skip to content
Snippets Groups Projects
Commit d909df0e authored by Markus Klose's avatar Markus Klose
Browse files

Node-exporter first steps

parent 813a5f2b
No related branches found
No related tags found
No related merge requests found
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:
......
......@@ -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
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment