Instalar y Verificar Ops Agent para Logging y Monitoreo en Compute Engine (GCP)

Guía práctica para instalar y verificar Ops Agent en Compute Engine de Google Cloud, con monitoreo, logs y métricas en Cloud Monitoring y Logs Explorer, desde consola o CLI.

22 ago 2025 • 3 min read • Q2BSTUDIO Team

Inteligencia-Artificial-

Part-20: Google Cloud Compute Engine – Instalar y Verificar Ops Agent para Registro y Monitoreo en Google Cloud Platform GCP

El agente Ops Agent es el agente recomendado por Google Cloud para monitoreo y registro en instancias de Compute Engine. Sustituye a los agentes heredados de Monitoring y Logging con un único agente unificado que ofrece mejor rendimiento, instalación y gestión simplificadas, soporte para Linux y Windows y soporte integrado para logs, métricas y aplicaciones de terceros.

Paso 01 Introducción - En este tutorial veremos dos métodos de instalación: método 1 instalar Ops Agent durante la creación de la VM desde la consola y método 2 instalar Ops Agent manualmente en una VM existente mediante CLI y SSH.

Paso 02 Instalar Ops Agent - Método consola: al crear la VM en Compute Engine seleccionar el nombre de la instancia por ejemplo demo1-opsagent y en la sección Observabilidad o Ops Agent marcar instalar Ops Agent para Monitoring y Logging. Al crear la VM el agente se instalará automáticamente.

Paso 02 Instalar Ops Agent manualmente - Crear una VM desde CLI por ejemplo con el siguiente comando span gcloud compute instances create demo2-opsagent --zone=us-central1-a --machine-type=e2-micro --network-interface=subnet=default --tags=http-server --metadata-from-file=startup-script=webserver-install.sh span Conectarse por SSH e instalar Ops Agent con estos pasos span gcloud compute ssh --zone=us-central1-a demo2-opsagent --project gcpdemos span curl -sSO https://dl.google.com/cloudagents/add-google-cloud-ops-agent-repo.sh span sudo bash add-google-cloud-ops-agent-repo.sh --also-install span sudo apt list --installed | grep google-cloud-ops-agent span sudo systemctl status google-cloud-ops-agent* span sudo service google-cloud-ops-agent restart span

Paso 03 Revisar métricas de la VM - En Compute Engine ir a VM Instances seleccionar demo2-opsagent y la pestaña Observabilidad. Consultar métricas clave como CPU, procesos, memoria y capacidad de disco. Si el agente no está instalado aparecerá el mensaje Requires Ops Agent.

Paso 04 Verificar en Cloud Monitoring - En Monitoring ir a Overview y seleccionar VIEW GCE DASHBOARD luego VMs Dashboard para verificar el estado del agente Ops Agent en las instancias.

Paso 05 Explorar métricas y logs - En el GCE Dashboard revisar la pestaña Metrics para CPU, memoria, disco y procesos y la pestaña Logs para los registros del sistema y aplicaciones recogidos por el Ops Agent.

Paso 06 Verificar logs en Logs Explorer - En Logging ir a Logs Explorer y filtrar por nombre de recurso demo2-opsagent para revisar logs de sistema y aplicaciones confirmando la recolección correcta.

Paso 07 Limpieza - Eliminar las VMs creadas para la demostración con el comando span gcloud compute instances delete demo1-opsagent demo2-opsagent --zone=us-central1-a span

Resumen - Con estos pasos se instala, verifica y exploran las capacidades del Google Cloud Ops Agent para monitoreo y logging en instancias de Compute Engine, mejorando visibilidad y operaciones de la infraestructura.

Sobre Q2BSTUDIO - Q2BSTUDIO es una empresa de desarrollo de software especializada en aplicaciones a medida y software a medida. Ofrecemos soluciones en inteligencia artificial, ia para empresas, agentes IA y servicios de ciberseguridad. También proporcionamos servicios cloud aws y azure, servicios de inteligencia de negocio y soluciones con Power BI para impulsar análisis y toma de decisiones. Nuestro equipo combina experiencia en desarrollo a medida, implementación de agentes inteligentes y ciberseguridad para entregar proyectos seguros y escalables. Palabras clave para posicionamiento aplicaciones a medida software a medida inteligencia artificial ciberseguridad servicios cloud aws y azure servicios inteligencia de negocio ia para empresas agentes IA power BI.

Si necesitas que Q2BSTUDIO implemente la integración de Ops Agent, configure alertas en Cloud Monitoring o desarrolle aplicaciones a medida que consuman métricas y logs para inteligencia de negocio y modelos de IA, contáctanos para diseñar una solución completa y segura adaptada a tu empresa.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Artificial intelligence

AI agents, chatbots, and intelligent assistants that automate tasks and serve your customers 24/7 to improve the efficiency of your business.

More info

Software Development

Web, mobile, and desktop applications, intranets, e-commerce, SaaS, and management platforms designed for your company's specific needs.

More info

Cloud services

Migration, infrastructure, managed hosting, high availability, and security on Microsoft Azure and Amazon Web Services to help your business scale without limits.

More info

Cybersecurity and pentesting

Security audits, penetration testing and protection of applications, data and infrastructure on-premise and cloud, with ethical hacking and regulatory compliance.

More info

Business Intelligence

Dashboards and data analysis with Power BI: we integrate your sources, design dashboards and KPIs and turn your data into decisions.

More info

Process automation

We automate repetitive tasks and connect your applications with n8n, Power Automate, Make, and RPA, eliminating manual work and increasing productivity.

More info

Training for Companies

We train your teams in technology with criteria: web development, databases, Git, best practices and security, automation with n8n, artificial intelligence for companies and creation of AI solutions with Azure AI Foundry.

More info

Code Auditing

We audit the code that you, your team or an AI create: we tell you what is good and what to improve, we secure it and make it ready for production, web or app.

More info

AI Image Generation

We create for you the images that your business needs with artificial intelligence: product, networks, advertising, illustration and avatars. You tell us what you want and we deliver it ready to use.

More info

AI Video Generation

We create videos with artificial intelligence for you: promotional, networking, virtual presenters, dubbing and animations. You tell us the idea and we will deliver it assembled and ready to publish.

More info

AI Conversational Avatars

We create conversational avatars with AI – digital humans with a face and voice – that serve your customers and teams with the knowledge of your company, on your website, interactive monitors, WhatsApp or Teams.

More info

Online Marketing and AI

Google Ads, Meta Ads, LinkedIn Ads and AI Engine Positioning (GEO/AEO): we attract customers and make your brand appear where they search for you, also on ChatGPT, Gemini and Perplexity.

More info

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.