Ruby 애플리케이션 Cloud Native 모니터링
5128 단어 CloudNativemonitoringRuby
What's Cloud Native?
Why Cloud Native? (in Quipper case)
The Theree Pillars of Observability
https://www.oreilly.com/library/view/distributed-systems-observability/9781492033431/ch04.html
Collecting Ruby Metrics for Datadog
Prometheus
Prometheus Exporter
# HELP ruby_rss Total RSS used by process.
# TYPE ruby_rss gauge
ruby_rss{type="master",pid="1",pod_name="api-6bcf6c8554-jntdq"} 390942720
ruby_rss{pod_name="api-6bcf6c8554-jntdq",type="web",pid="45"} 346877952
ruby_rss{pod_name="api-6bcf6c8554-jntdq",type="web",pid="42"} 347594752
ruby_rss{pod_name="api-6bcf6c8554-jntdq",type="web",pid="39"} 350285824
ruby_rss{pod_name="api-6bcf6c8554-jntdq",type="web",pid="50"} 347901952
# HELP ruby_unicorn_workers_total Number of unicorn workers.
# TYPE ruby_unicorn_workers_total gauge
ruby_unicorn_workers_total{pod_name="api-6bcf6c8554-jntdq"} 4
# HELP ruby_unicorn_active_workers_total Number of active unicorn workers
# TYPE ruby_unicorn_active_workers_total gauge
ruby_unicorn_active_workers_total{pod_name="api-6bcf6c8554-jntdq"} 0
Datadog and Kubernetes
Annotation
metadata:
annotations:
ad.datadoghq.com/api.check_names: |
["prometheus"]
ad.datadoghq.com/api.init_configs: |
[{}]
ad.datadoghq.com/api.instances: |
[
{
"prometheus_url": "http://%%host%%:9394/metrics",
"namespace": "prometheus_checks",
"metrics": ["*"]
}
]
오늘의 성과
루비 퀴즈: 무슨 문제 있어요?
원시 코드
def worker_process_count
# ...
# find all processes whose parent is the unicorn master
# but we're actually only interested in the number of processes (= lines of output)
result = `ps --no-header -o pid --ppid #{pid}`
result.lines.count
end
Reference
이 문제에 관하여(Ruby 애플리케이션 Cloud Native 모니터링), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/yuya_takeyama/items/493c82904deff70e5c4b텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)