Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # cat /usr/share/nginx/html/alerta/config.json
- {"endpoint": "/api"}
- # cat /etc/nginx/sites-available/alerta.conf
- server {
- listen 127.0.0.1:80;
- listen 443 ssl;
- # SSL settings
- include snippets/certbot.conf;
- ssl_certificate /etc/ssl/certs/nginx-ss.crt;
- ssl_certificate_key /etc/ssl/private/nginx-ss.key;
- client_max_body_size 25m;
- client_body_timeout 30;
- add_header Content-Security-Policy upgrade-insecure-requests;
- index index.html index.htm index.php index.cgi index.pl index.xhtml index.view;
- default_type application/octet-stream;
- server_name alerta.my.domain;
- root /usr/share/nginx/html/alerta;
- # Deny .htaccess files
- location ~ /\.ht {
- deny all;
- }
- location /api { try_files $uri @api; }
- location @api {
- include uwsgi_params;
- uwsgi_pass unix:/tmp/uwsgi.sock;
- proxy_set_header Host $host:$server_port;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- }
- location / {
- root /usr/share/nginx/html/alerta;
- }
- }
- # cat .bashrc | grep export
- export ALERTA_API_KEY=mysecretkey
- export ALERTA_ENDPOINT=http://alerta.my.domain/api
- export LC_ALL=C.UTF-8
- export LANG=C.UTF-8
- export ALERTA_CONF_FILE=~/.alerta.conf
- export ALERTA_DEFAULT_PROFILE=production
- # cat .alerta.conf
- [DEFAULT]
- timezone = Europe/Stockholm
- output = json
- [profile production]
- endpoint = http://alerta.my.domain/api
- key = mysecretkey
- sslverify = off
- timeout = 10.0
- # cat /etc/alertad.conf | grep -v "^#"
- DEBUG = True
- BASE_URL = '/api'
- LOGGER_NAME = 'alerta'
- LOG_FILE = '/var/log/alertad.log'
- LOG_HANDLERS = ['console','file']
- LOG_FORMAT = 'verbose'
- MONGO_URI = 'mongodb://127.0.0.1:27017/monitoring'
- MONGO_DATABASE = 'monitoring'
- CORS_ORIGINS = [
- 'http://127.0.0.1',
- 'http://localhost',
- 'http://alerta.my.domain',
- 'https://127.0.0.1',
- 'https://localhost',
- 'httpp://alerta.my.domain'
- ]
- AUTH_REQUIRED = True
- SECRET_KEY = 'mysecretkeyhere'
- ADMIN_USERS = ['somethingmagic@gmail.com']
- CUSTOMER_VIEWS = True
- SIGNUP_ENABLED = False
- TOKEN_EXPIRE_DAYS = 7
- QUERY_LIMIT = 10000
- HISTORY_LIMIT = 100
- API_KEY_EXPIRE_DAYS = 365
- AUTO_REFRESH_ALLOW = 'ON'
- SENDER_API_ALLOW = 'ON'
- EMAIL_VERIFICATION = False
- SMTP_HOST = 'localhost'
- SMTP_PORT = 25
- MAIL_FROM = 'alerta@my.domain'
- SMTP_PASSWORD = ''
- BLACKOUT_DURATION = 86400
- SEVERITY_MAP = {
- 'security': 0,
- 'fatal': 0,
- 'critical': 1,
- 'major': 2,
- 'minor': 3,
- 'warning': 4,
- 'indeterminate': 5,
- 'cleared': 5,
- 'normal': 5,
- 'ok': 5,
- 'informational': 6,
- 'debug': 7,
- 'trace': 8,
- 'unknown': 9
- }
- DEFAULT_SEVERITY = 'indeterminate'
- PLUGINS = ['reject', 'blackout']
- PLUGINS_RAISE_ON_ERROR = False # keep processing other plugins if exception
- ALLOWED_ENVIRONMENTS=['Production', 'Development', 'Testing', 'Code']
- USE_PROXYFIX = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement