ip a → (ens37) 172.16.132.128yum install git -y cd / git clone https://github.com/agarciafer/elk.git cd /root rpm -ivh metricbeat-6.7.1-x86_64.rpm rpm -ivh logstash-6.7.1.rpm cp /elk/example.conf /etc/logstash /usr/share/logstash/bin/logstash -f /etc/logstash/example.conf rpm -ivh elasticsearch-6.7.1.rpm rpm -ivh kibana-6.7.1-x86_64.rpm
57 network.host: [ "localhost", "192.168.1.150" ]
systemctl start elasticsearch.service systemctl status elasticsearch.service systemctl enable elasticsearch.service netstat -putan | grep -w 9200 netstat -putan | grep -w 9300
7 server.host: "192.168.93.128" # dirección MV 28 elasticsearch.hosts: ["http://localhost:9200"]
systemctl start kibana.service systemctl status kibana.service systemctl enable kibana.service netstat -putan | grep -w 5601
49 setup.dashboards.enabled: true 67 host: "192.168.93.128:5601" 144 xpack.monitoring.enabled: true 151 xpack.monitoring.elasticsearch:
metricbeat modules list systemctl start metricbeat.service systemctl status metricbeat.service systemctl enable metricbeat.service tail -f /var/log/elasticsearch/elasticsearch.log # comprobar que metricbeat está enviando datos metricbeat test config -c /etc/metricbeat/metricbeat.yml
docker run -dtiP --name web-1 httpd docker run -dtiP --name web-2 nginx
metricbeat modules enable docker
# Module: docker # Docs: https://www.elastic.co/guide/en/beats/metricbeat/6.7/metricbeat-module-docker.html - module: docker metricsets: - container - cpu - diskio - event - healthcheck - info - memory - network period: 10s hosts: ["unix:///var/run/docker.sock"] # If set to true, replace dots in labels with `_`. labels.dedot: false # To connect to Docker over TLS you must specify a client and CA certificate. #ssl: #certificate_authority: "/etc/pki/root/ca.pem" #certificate: "/etc/pki/client/cert.pem" #key: "/etc/pki/client/cert.key"