Skip to content

Commit

Permalink
feat: Django 모니터링
Browse files Browse the repository at this point in the history
  • Loading branch information
suha committed Jan 29, 2024
1 parent a18b76b commit 58fbbb7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 25 deletions.
2 changes: 2 additions & 0 deletions backend/nTeamProject/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django_prometheus.middleware.PrometheusBeforeMiddleware',
'django_prometheus.middleware.PrometheusAfterMiddleware',
]
ROOT_URLCONF = 'nTeamProject.urls'
TEMPLATES = [
Expand Down
2 changes: 1 addition & 1 deletion backend/nTeamProject/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
path('api/v1/subscribe/', include("subscribe.urls")),
path('api/v1/chart/', include("chart.urls")),
path('api/v1/search/', include("search.urls")),
path('', include("django_prometheus.urls"), name='metrics'),
path('', include("django_prometheus.urls")),
]

urlpatterns += [
Expand Down
5 changes: 0 additions & 5 deletions prometheus/config/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@ global:
monitor: 'codelab-monitor'
query_log_file: query_log_file.log

# rule_files:
# - "rule.yml"

scrape_configs:
- job_name: 'monitoring-item'
scrape_interval: 10s
scrape_timeout: 10s
metrics_path: '/metrics'
honor_labels: false
honor_timestamps: false
scheme: 'http'

static_configs:
Expand Down
19 changes: 0 additions & 19 deletions prometheus/config/rule.yml

This file was deleted.

0 comments on commit 58fbbb7

Please sign in to comment.