Prometheus Exporter
Grundinstallation für Monitoring mit Prometheus und Grafana.
Base Exporter:
#!/bin/bash
apt-get update && apt-get upgrade -y
#Base Exporter
apt-get install -y prometheus-node-exporter prometheus-process-exporter
Exporter for Apache Webserver:
#!/bin/bash
apt-get update && apt-get upgrade -y
#Apache Exporter
apt-get install -y prometheus-node-exporter prometheus-process-exporter prometheus-apache-exporter
Exporter for Mysql Datenbankserver:
#!/bin/bash
apt-get update && apt-get upgrade -y
#Mysql Exporter
apt-get install -y prometheus-node-exporter prometheus-process-exporter prometheus-mysqld-exporter
Exporter for Redis Datenbankserver:
#!/bin/bash
apt-get update && apt-get upgrade -y
#Redis Exporter
apt-get install -y prometheus-node-exporter prometheus-process-exporter prometheus-redis-exporter
Exporter for IPMI:
#!/bin/bash
apt-get update && apt-get upgrade -y
#Ipmi Exporter
apt-get install -y prometheus-node-exporter prometheus-process-exporter prometheus-ipmi-exporter
Exporter for NGINX Webserver:
#!/bin/bash
apt-get update && apt-get upgrade -y
#NGINX Exporter
apt-get install -y prometheus-node-exporter prometheus-process-exporter prometheus-nginx-exporter
Exporter for PostGRES Datenbankserver:
#!/bin/bash
apt-get update && apt-get upgrade -y
#PostGRES Exporter
apt-get install -y prometheus-node-exporter prometheus-process-exporter prometheus-postgres-exporter
Exporter for SNMP:
#!/bin/bash
apt-get update && apt-get upgrade -y
#SNMP Exporter
apt-get install -y prometheus-node-exporter prometheus-process-exporter prometheus-snmp-exporter
Default Ports
Node Exporter |
9100 |
MariaDB |
9101 |
Redis |
9102 |
Apache |
9103 |
Firewall Regeln
Einzelne Exporter
Node Exporter
iptables -A INPUT -p tcp -m tcp -s 209.16.144.27/32 --dport 9100 -j ACCEPT && iptables -A INPUT -p tcp -m tcp --dport 9100 -j DROP
MariaDB Exporter
iptables -A INPUT -p tcp -m tcp -s 209.16.144.27/32 --dport 9101 -j ACCEPT && iptables -A INPUT -p tcp -m tcp --dport 9101 -j DROP
Redis Exporter
iptables -A INPUT -p tcp -m tcp -s 209.16.144.27/32 --dport 9102 -j ACCEPT && iptables -A INPUT -p tcp -m tcp --dport 9102 -j DROP
Node+Redis+MariaDB Zusammen
iptables -A INPUT -p tcp -m tcp -m multiport -s 209.16.144.27/32 -j ACCEPT --dports 9100,9101,9102 && iptables -A INPUT -p tcp -m tcp -m multiport -j DROP --dports 9100,9101,9102
Keine Kommentare