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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Tim Hobelsberger
Cloud_Computing
Commits
b805dc58
Commit
b805dc58
authored
Nov 21, 2022
by
Markus Klose
Browse files
Options
Downloads
Patches
Plain Diff
Erster Verusch mit Prometheus
parent
2e716dca
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Dockerfile
+1
-1
1 addition, 1 deletion
Dockerfile
docker-compose.yaml
+24
-0
24 additions, 0 deletions
docker-compose.yaml
etc/prometheus/prometheus.yml
+20
-0
20 additions, 0 deletions
etc/prometheus/prometheus.yml
routes/register.js
+0
-1
0 additions, 1 deletion
routes/register.js
with
45 additions
and
2 deletions
Dockerfile
+
1
−
1
View file @
b805dc58
...
@@ -10,7 +10,7 @@ COPY ["package.json", "package-lock.json*", "./"]
...
@@ -10,7 +10,7 @@ COPY ["package.json", "package-lock.json*", "./"]
RUN
npm
install
RUN
npm
install
# Bundle app source code inside the Docker Image
# Bundle app source code inside the Docker Image
COPY
. .
EXPOSE
3000
EXPOSE
3000
CMD
[ "npm", "start" ]
CMD
[ "npm", "start" ]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docker-compose.yaml
+
24
−
0
View file @
b805dc58
version
:
'
3'
version
:
'
3'
services
:
services
:
prometheus
:
image
:
prom/prometheus:latest
container_name
:
prometheus
ports
:
-
"
9090:9090"
volumes
:
-
/etc/prometheus:/etc/prometheus
restart
:
unless-stopped
command
:
-
"
--config.file=/etc/prometheus/prometheus.yml"
grafana
:
image
:
grafana/grafana:latest
container_name
:
grafana
ports
:
-
"
3003:3003"
volumes
:
-
grafana-data:/var/lib/grafana
restart
:
unless-stopped
mongodb
:
mongodb
:
image
:
mongo
image
:
mongo
ports
:
ports
:
-
27017:27017
-
27017:27017
volumes
:
volumes
:
-
mongodb:/data/db
-
mongodb:/data/db
node
:
node
:
restart
:
always
restart
:
always
build
:
.
build
:
.
...
@@ -21,3 +42,6 @@ services:
...
@@ -21,3 +42,6 @@ services:
volumes
:
volumes
:
mongodb
:
mongodb
:
prometheus-data
:
grafana-data
:
This diff is collapsed.
Click to expand it.
etc/prometheus/prometheus.yml
0 → 100644
+
20
−
0
View file @
b805dc58
global
:
scrape_interval
:
15s
# By default, scrape targets every 15 seconds.
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels
:
monitor
:
'
codelab-monitor'
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs
:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
-
job_name
:
'
prometheus'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval
:
5s
static_configs
:
-
targets
:
[
'
localhost:9090'
]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
routes/register.js
+
0
−
1
View file @
b805dc58
...
@@ -49,7 +49,6 @@ router.post('/', async(req, res) => {
...
@@ -49,7 +49,6 @@ router.post('/', async(req, res) => {
res
.
sendStatus
(
401
);
res
.
sendStatus
(
401
);
}
}
else
{
else
{
console
.
log
(
"
Count is
"
,
count
)
user
.
save
()
user
.
save
()
.
then
(
user
=>
{
.
then
(
user
=>
{
res
.
sendStatus
(
200
);
res
.
sendStatus
(
200
);
...
...
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
sign in
to comment