Monitorando o MongoDB 3.2 usando o Stackdriver no Google Compute Engine falhou silenciosamente

1

Estou tendo problemas para monitorar o MongoDB 3.2 com o Stackdriver em 28 de agosto de 2016.

Não há menção de mongo em /var/log/syslog , mas se eu cometi um erro de configuração no arquivo .conf , ele reclama, então sei que está carregando o arquivo corretamente ...

Portanto, não há erros, mas nenhuma menção a mongo em /var/log/syslog e link afirma que eu não não instalei o agente.

gke-fatih-standard-fb894cbb-d7ue:/opt/stackdriver/collectd/etc$ sudo service stackdriver-agent restart
[....] Restarting Stackdriver metrics collection agent: stackdriver-agentoption = Interval; value = 60.000000;
Created new plugin context.
option = Interval; value = 60.000000;
Created new plugin context.
option = PIDFile; value = /var/run/stackdriver-agent.pid;
option = Interval; value = 60.000000;
Created new plugin context.
. ok

$ tail -F /var/log/syslog
Aug 28 06:53:01 gke-fatih-standard-fb894cbb-d7ue /USR/SBIN/CRON[21824]: (root) CMD (/etc/supervisor/supervisor_watcher.sh 2>&1 | logger)
Aug 28 06:53:03 gke-fatih-standard-fb894cbb-d7ue collectd[21844]: type = syslog, key = LogLevel, value = info
Aug 28 06:53:03 gke-fatih-standard-fb894cbb-d7ue collectd[21844]: write_gcm: inside module_register for stackdriver_agent/5.5.0-340.wheezy
Aug 28 06:53:03 gke-fatih-standard-fb894cbb-d7ue collectd[21845]: type = syslog, key = LogLevel, value = info
Aug 28 06:53:03 gke-fatih-standard-fb894cbb-d7ue collectd[21845]: write_gcm: inside module_register for stackdriver_agent/5.5.0-340.wheezy
Aug 28 06:53:03 gke-fatih-standard-fb894cbb-d7ue collectd[21846]: Initialization complete, entering read-loop.
Aug 28 06:53:03 gke-fatih-standard-fb894cbb-d7ue collectd[21846]: match_throttle_metadata_keys: 1 history entries, 1 distinct keys, 78 bytes server memory.
Aug 28 06:53:03 gke-fatih-standard-fb894cbb-d7ue collectd[21846]: tcpconns plugin: Reading from netlink succeeded. Will use the netlink method from now on.
Aug 28 06:53:03 gke-fatih-standard-fb894cbb-d7ue collectd[21846]: write_gcm: Asking metadata server for auth token
Aug 28 06:53:04 gke-fatih-standard-fb894cbb-d7ue collectd[21846]: match_throttle_metadata_keys: 2 history entries, 1025 distinct keys, 102801 bytes server memory.

Note que a instância / nó é monitorada corretamente, somente o MongoDB é problemático.

/opt/stackdriver/collectd/etc/collect.d/mongo0.conf :

# scheduled to node: gke-fatih-standard-fb894cbb-d7ue
# This is the monitoring configuration for MongoDB.
# Look for STATS_USER, STATS_PASS, MONGODB_HOST and MONGODB_PORT to adjust your configuration file.
LoadPlugin mongodb
<Plugin "mongodb">
    # When using non-standard MongoDB configurations, replace the below with
    #Host "MONGODB_HOST"
    #Port "MONGODB_PORT"
    # Must use the load balancer because we don't know the fixed nodePort
    Host "xxx"
    Port "27017"

    # If you restricted access to the database, you can set the username and
    # password here:
    User "stats"
    Password "xxx"
</Plugin>

Relacionado a Monitorando o MongoDB 3 usando o StackDriver no GCE

    
por Hendy Irawan 28.08.2016 / 09:00

1 resposta

1

Depois de fazer sudo service stackdriver-agent restart novamente (o que eu fiz antes) e talvez ~ 30 minutos do incidente original, as métricas agora são detectadas pelo Stackdriver.

Então, se você tiver certeza de que fez tudo certo e sem erros, tente reiniciar stackdriver-agent várias vezes e aguardando ~ 30 minutos.

A falta de qualquer coisa mongo -relacionada em /var/log/syslog é um problema. Espero que o @ Corey-Kosak possa fornecer mais informações.

    
por 28.08.2016 / 09:00