@kyanny's blog

My thoughts, my life. Views/opinions are my own.

MongoDB の Free Monitoring

Docker で遊んでいたらコンソールに書いてあった。

---
        Enable MongoDB's free cloud-based monitoring service, which will then receive and display
        metrics about your deployment (disk utilization, CPU, operation statistics, etc).

        The monitoring data will be available on a MongoDB website with a unique URL accessible to you
        and anyone you share the URL with. MongoDB may use this information to make product
        improvements and to suggest MongoDB products and deployment options to you.

        To enable free monitoring, run the following command: db.enableFreeMonitoring()
        To permanently disable this reminder, run the following command: db.disableFreeMonitoring()
---

Free Monitoring — MongoDB Manual

Community Edition に無料でついてくる。

db.enableFreeMonitoring() で有効化、 db.disableFreeMonitoring() で無効化。

インスタンスごとにユニークな URL が発行されるっぽい。 URL を共有すれば誰でも見える。 URL を変更する方法は見つけられなかった。メトリクスデータは 24 時間で消える。

> db.enableFreeMonitoring()
{
    "state" : "enabled",
    "message" : "To see your monitoring data, navigate to the unique URL below. Anyone you share the URL with will also be able to view this page. You can disable monitoring at any time by running db.disableFreeMonitoring().",
    "url" : "https://cloud.mongodb.com/freemonitoring/cluster/UX6ACVKMB6E3LMOFZ3Y7DNGY7TAZTXXW",
    "userReminder" : "",
    "ok" : 1
}
> db.disableFreeMonitoring()
>

db.disableFreeMonitoring() しても URL は無効にならない。メトリクス送信が止まるだけなのかもしれない。