Diferències
Ací es mostren les diferències entre la revisió seleccionada i la versió actual de la pàgina.
| Ambdós costats versió prèvia Revisió prèvia Següent revisió | Revisió prèvia | ||
| info:cursos:pue:devops2022:s14 [09/02/2022 09:21] – mate | info:cursos:pue:devops2022:s14 [28/03/2022 12:53] (actual) – mate | ||
|---|---|---|---|
| Línia 1: | Línia 1: | ||
| - | = DevOps Sesión 14 (2022-03-28) | + | = DevOps Sesión 14 (2022-03-28) |
| == Documentación relacionada | == Documentación relacionada | ||
| - | == Clase | + | <callout type=" |
| + | * ./5-Topic 705 Service Operations | ||
| + | * ./5-Topic 705 Service Operations/ | ||
| + | * ./5-Topic 705 Service Operations/Clase Monitorizacion.txt | ||
| + | </ | ||
| + | == inventario dinámico Ansible | ||
| + | <callout type=" | ||
| + | * ./4-Topic 704 Configuration Management/ | ||
| + | * ./4-Topic 704 Configuration Management/ | ||
| + | * [[https:// | ||
| + | </ | ||
| + | * ec2.py, ec2.ini (posiblemente deprecado, mejor usar el método del PDF) | ||
| + | |||
| + | == Ansible + ESXi | ||
| + | <callout type=" | ||
| + | * Material Curso Ansible/ | ||
| + | </ | ||
| + | |||
| + | == instalación VMWare Player + ELK | ||
| + | <callout type=" | ||
| + | * ./5-Topic 705 Service Operations/ | ||
| + | * ./5-Topic 705 Service Operations/ | ||
| + | * ./5-Topic 705 Service Operations/ | ||
| + | * [[https:// | ||
| + | </ | ||
| + | * root: | ||
| + | * '' | ||
| + | |||
| + | == Herramientas manejo logs | ||
| + | * kubernetes: prometheus + grafana | ||
| + | * 1-Laboratorios ELK.pdf, pag. 90 | ||
| + | * 2-Despliegue de Aplicaciones Kubernetes/ | ||
| + | * servidor de métricas | ||
| + | * helm: instalación software en k8s tipo apt | ||
| + | |||
| + | == ELK | ||
| + | * ./5-Topic 705 Service Operations/ | ||
| + | * ElasticSearch: | ||
| + | * puertos 9200,9300 | ||
| + | * Logstash: pre-procesador de logs | ||
| + | * puerto: 5044 | ||
| + | * Beats: clientes ligeros que capturan los datos para ElasticSearch o Logstash | ||
| + | * winlogbeats (pago?) | ||
| + | * Kibana: intérprete gráfico de los datos de ElasticSearch | ||
| + | * puerto: 5601 | ||
| + | |||
| + | === instalación | ||
| + | <code bash> | ||
| + | yum install git -y | ||
| + | cd / | ||
| + | git clone https:// | ||
| + | cd /root | ||
| + | rpm -ivh metricbeat-6.7.1-x86_64.rpm | ||
| + | rpm -ivh logstash-6.7.1.rpm | ||
| + | cp / | ||
| + | / | ||
| + | rpm -ivh elasticsearch-6.7.1.rpm | ||
| + | rpm -ivh kibana-6.7.1-x86_64.rpm | ||
| + | </ | ||
| + | <code yaml ; / | ||
| + | 57 network.host: | ||
| + | </ | ||
| + | <code bash> | ||
| + | systemctl start elasticsearch.service | ||
| + | systemctl status elasticsearch.service | ||
| + | systemctl enable elasticsearch.service | ||
| + | |||
| + | netstat -putan | grep -w 9200 | ||
| + | netstat -putan | grep -w 9300 | ||
| + | </ | ||
| + | |||
| + | <code yaml ; / | ||
| + | 7 server.host: | ||
| + | 28 elasticsearch.hosts: | ||
| + | </ | ||
| + | <code bash> | ||
| + | systemctl start kibana.service | ||
| + | systemctl status kibana.service | ||
| + | systemctl enable kibana.service | ||
| + | |||
| + | netstat -putan | grep -w 5601 | ||
| + | </ | ||
| + | * [[http:// | ||
| + | |||
| + | == beats | ||
| + | * 1-Laboratorios ELK.pdf, pag. 20 | ||
| + | * <code yaml ; / | ||
| + | 49 setup.dashboards.enabled: | ||
| + | 67 host: " | ||
| + | 144 xpack.monitoring.enabled: | ||
| + | 151 xpack.monitoring.elasticsearch: | ||
| + | </ | ||
| + | * **/ | ||
| + | * <code bash> | ||
| + | systemctl start metricbeat.service | ||
| + | systemctl status metricbeat.service | ||
| + | systemctl enable metricbeat.service | ||
| + | tail -f / | ||
| + | metricbeat test config -c / | ||
| + | </ | ||
| + | * En Kibana, activamos **Monitoring** | ||
| + | * vamos **Dashboard** y buscamos **[Metricbeat System] Overview** | ||
| + | |||
| + | === habilitar módulo (docker) | ||
| + | * [[https:// | ||
| + | * <code bash> | ||
| + | docker run -dtiP --name web-2 nginx | ||
| + | </ | ||
| + | * <code bash> | ||
| + | * <code yaml ; / | ||
| + | # Docs: https:// | ||
| + | |||
| + | - module: docker | ||
| + | metricsets: | ||
| + | - container | ||
| + | - cpu | ||
| + | - diskio | ||
| + | - event | ||
| + | - healthcheck | ||
| + | - info | ||
| + | - memory | ||
| + | - network | ||
| + | period: 10s | ||
| + | hosts: [" | ||
| + | |||
| + | # If set to true, replace dots in labels with `_`. | ||
| + | labels.dedot: | ||
| + | |||
| + | # To connect to Docker over TLS you must specify a client and CA certificate. | ||
| + | #ssl: | ||
| + | # | ||
| + | # | ||
| + | #key: "/ | ||
| + | </ | ||
| + | * En Kibana, vamos a **Dashboard** y buscamos **[Metricbeat Docker] Overview** | ||
| + | |||
| + | |||
| == TODO | == TODO | ||
| <callout type=" | <callout type=" | ||