æŠèŠ
AI ã Grafana ãèªã¿åããããã«ããŸããããã·ã¥ããŒããæ€çŽ¢ããŠããã«ãšã¯ãšãªã確èªããPrometheusãLokiãSQL ã®ããŒã¿ãœãŒã¹ã«ã¯ãšãªãå®è¡ããçºç«äžã®ã¢ã©ãŒããšã«ãŒã«ã®å®çŸ©ã確èªããã¢ãããŒã·ã§ã³ãèªã¿åã£ãŠè¿œå ããã³ã³ã¿ã¯ããã€ã³ãããŠãŒã¶ãŒãããŒã ãäžèЧã§ããŸããGrafana Cloud ãšã»ã«ããã¹ãã® Grafana ã®äž¡æ¹ã§åäœããŸãã
ã¬ã€ãä»ãã»ããã¢ãã
Grafana ã ChatGPT ã« 2 åã§æ¥ç¶
AnythingMCP Cloud ã®ç¡æãã©ã€ã¢ã«ãå§ããã¬ã€ãä»ãã»ããã¢ããã§ Grafana ãæ¥ç¶ããŠãMCP URL ã ChatGPT ã«è¿œå ããŸããã³ãŒãããµãŒããŒã®éçšãäžèŠã§ãã
ã¯ã¬ãžããã«ãŒãäžèŠ Â· 7æ¥éã®è©Šçš · ã»ã«ããã¹ãã®éžæè¢ãã
ChatGPT ã®ãã©ã°ã€ã³ãã£ã¬ã¯ããªã«ãã AnythingMCP ãã©ã°ã€ã³ã¯ãAnythingMCP Cloud äžã§ç€Ÿå
ããŒã¿ããŒã¹ïŒPostgreSQLãMySQLãSQL ServerãOracleãSAP HANAãSQLiteãMongoDBãèªã¿åãå°çšïŒãžã®è³ªåã«çããŸããæ²èŒããŒãžãéã (æ°ããã¿ãã§éããŸã)ãInstall plugin ãã¯ãªãã¯ããŠãã ããããã以å€ã®ã³ãã¯ã¿ã¯ãAnythingMCP ã® MCP URL ã䜿ã£ãŠã«ã¹ã¿ã MCP ãµãŒããŒãšã㊠ChatGPT ã«è¿œå ããŸãã
ããèããŠã¿ãã
Grafana ã®ãµã³ãã«ããã³ãã
ããã³ãããã¯ãªãã¯ã§ã³ããŒãClaude / ChatGPT / Cursor / Gemini / Copilot / OpenClaw ã«è²Œãä»ããŠããã®ã³ãã¯ã¿ãŒã§å®è¡ã§ããŸãã
Claude 㯠AI ã®ãã誀ãããšããããŸããåçãã確èªãã ããã
ð¡ ã€ã³ã¹ããŒã«äžèŠ? cloud.anythingmcp.com ãçŽæ¥å©çšããŠãã ããã ãµã€ã³ã€ã³ããConnectors â Grafana ãã¯ãªãã¯ãèªèšŒæ å ±ã貌ãä»ããMCP API ããŒãçºè¡ããã°å®äºã§ããDocker ã
git cloneãããŒã«ã«ãµãŒããŒãäžèŠã
Grafana + ChatGPT
AI ã Grafana ãèªã¿åããããã«ããŸããããã·ã¥ããŒããæ€çŽ¢ããŠããã«ãšã¯ãšãªã確èªããPrometheusãLokiãSQL ã®ããŒã¿ãœãŒã¹ã«ã¯ãšãªãå®è¡ããçºç«äžã®ã¢ã©ãŒããšã«ãŒã«ã®å®çŸ©ã確èªããã¢ãããŒã·ã§ã³ãèªã¿åã£ãŠè¿œå ããã³ã³ã¿ã¯ããã€ã³ãããŠãŒã¶ãŒãããŒã ãäžèЧã§ããŸããGrafana Cloud ãšã»ã«ããã¹ãã® Grafana ã®äž¡æ¹ã§åäœããŸãã
åææ¡ä»¶
å®å šãªã»ããã¢ããæé ã¯ã³ãã¯ã¿èªäœã«çµã¿èŸŒãŸããŠããŸã (ã¹ãã¢ã§ã³ãã¯ã¿ãéžæãããšè¡šç€º)ãå¿ èŠãªç°å¢å€æ°:
GRAFANA_URL, GRAFANA_SERVICE_ACCOUNT_TOKEN
ã¹ããã 1 â èªèšŒæ å ±ãååŸ
GRAFANA_URLã«ãGrafana ãéããšãã®ã¢ãã¬ã¹ãæ«å°Ÿã®ã¹ã©ãã·ã¥ãªãã§èšå®ããŸããGrafana Cloud ã§ã¯https://your-stack.grafana.netãç¬èªã®ã¢ãã¬ã¹ãªãhttps://grafana.example.comã®ããã«ãªããŸãïŒGrafana ããã¹ã®äžã§åããŠããå Žåã¯https://example.com/grafanaïŒãAnythingMCP Cloud ã§ã¯ãã€ã³ã¹ã¿ã³ã¹ã«ã€ã³ã¿ãŒãããããã¢ã¯ã»ã¹ã§ããå¿ èŠããããŸãã- Grafana ã§ Administration â Users and access â Service accounts ãéããAdd service account ãã¯ãªãã¯ããŠãååïŒããšãã° AnythingMCPïŒãšããŒã« Viewer ãèšå®ããŸãã
- ãµãŒãã¹ã¢ã«ãŠã³ããéã㊠Add service account token ãã¯ãªãã¯ããæå¹æéãéžãã§ããŒã¯ã³ãã³ããŒããŸããããŒã¯ã³ã¯
glsa_ã§å§ãŸããGrafana ã¯äžåºŠãã衚瀺ããŸããã - Bearer ãšããèªãä»ããã«
GRAFANA_SERVICE_ACCOUNT_TOKENã«è²Œãä»ããã³ãã¯ã¿ãã€ã³ã¹ããŒã«ããŸããããŒã¯ã³ãå±ãã®ã¯ããµãŒãã¹ã¢ã«ãŠã³ããå±ããçµç¹ã ãã§ãã grafana_get_current_orgã§èšå®ã確èªããŸããããŒã¯ã³ã«å¯Ÿå¿ããçµç¹ã衚瀺ãããŸããgrafana_get_healthã¯ããŒã¯ã³ããªããŠãå¿çãããããGrafana ã®ããŒãžã§ã³ã¯ããããŸãããããŒã¯ã³ãæ©èœããŠããããšã®èšŒæã«ã¯ãªããŸããã
ã©ã®ããŒã«ã«ããã: Viewer ã§ãããã·ã¥ããŒãããã©ã«ããŒãããŒã¿ãœãŒã¹ãã¯ãšãªãã¢ã©ãŒãã«ãŒã«ãçºç«äžã®ã¢ã©ãŒããã¢ãããŒã·ã§ã³ãã³ã³ã¿ã¯ããã€ã³ããã«ããŒã§ããŸãããŠãŒã¶ãŒãšããŒã ã®äžèЧã«ã¯ Adminãã¢ãããŒã·ã§ã³ã®è¿œå ã«ã¯ Editor ãå¿ èŠã§ããGrafana Cloud ãš Grafana Enterprise ã§ã¯ããµãŒãã¹ã¢ã«ãŠã³ããèªã¿åãåããŒã¿ãœãŒã¹ã«å¯Ÿããã¯ãšãªæš©éãå¿ èŠã§ãã
ã§ããããš: ããã·ã¥ããŒããšãã©ã«ããŒãæ€çŽ¢ããããã·ã¥ããŒãã®ããã«ã PromQLãLogQLãSQL ã®ã¯ãšãªãšãšãã«èªã¿åããŸããGrafana çµç±ã§ PrometheusïŒãŸã㯠MimirïŒãLokiãSQL ã®ããŒã¿ãœãŒã¹ã«ã¯ãšãªãå®è¡ããŸããä»ã©ã®ã¢ã©ãŒããçºç«ããŠãããããã®ã«ãŒã«ãã©ãå®çŸ©ãããŠããããã©ã®ã³ã³ã¿ã¯ããã€ã³ãã«éç¥ãå±ããã確èªããŸããã°ã©ãäžã§ãããã€ãã€ã³ã·ãã³ãã瀺ãã¢ãããŒã·ã§ã³ãèªã¿åããŸããçµç¹ã®ãŠãŒã¶ãŒãšããŒã ãäžèЧããŸãã
倿Žã¯ 1 ã€ã ããAI ã¯å
ã«ç¢ºèªããŸã: ã³ãã¯ã¿ã倿Žã§ããã®ã¯ãgrafana_create_annotation ã«ããã¢ãããŒã·ã§ã³ã®è¿œå ã ãã§ãããã¯ããã·ã¥ããŒãäžã§å
šå¡ã«è¡šç€ºãããŸãã远å ã®åã«ãAI ã¯ããã¹ããæå»ãã¿ã°ã瀺ããããªãã®æ¿èªãåŸ
ã¡ãŸããããã·ã¥ããŒããããŒã¿ãœãŒã¹ãã¢ã©ãŒãã«ãŒã«ã倿Žããæ©èœã¯ãªããäœãåé€ãããŸããã
ã·ãŒã¯ã¬ãã㯠Grafana ã«æ®ããŸã: ããŒã¿ãœãŒã¹ã®ãã¹ã¯ãŒããããŒã¯è¿ããããã³ã³ã¿ã¯ããã€ã³ã㯠Webhook URL ãããŒãå«ãèšå®ãé€ããŠè¿ãããŸãã
å¶é: ã¯ãšãªã®å¿çã¯çŽ 60 KB ã§åãè©°ãããããããAI ã¯ã¯ãšãªå ã§éèšãïŒsumãtopkãrateïŒãæéç¯å²ãçãä¿ã¡ãŸããæ°ãã v2 ã¹ããŒãã§ä¿åãããããã·ã¥ããŒãïŒã¿ããèªåã°ãªããã¬ã€ã¢ãŠãã䜿ã Grafana 12 ã®ããã·ã¥ããŒãïŒã¯ããã® API ã§ã¯èªã¿åããªãå ŽåããããŸãããã®å ŽåãGrafana ã¯æ°ãã API ã®ååãå«ããšã©ãŒãè¿ããŸãã
ãããããšã©ãŒ: 401 Invalid API key: ããŒã¯ã³ãééã£ãŠãããæéåãããŸãã¯åé€ãããããGRAFANA_URL ãå¥ã®ã¹ã¿ãã¯ãæããŠããŸãã403: ãµãŒãã¹ã¢ã«ãŠã³ãã®ããŒã«ãè¶³ããªãïŒãŠãŒã¶ãŒãšããŒã ã«ã¯ Adminãã¢ãããŒã·ã§ã³ã«ã¯ EditorïŒããŸãã¯ãã®ããŒã¿ãœãŒã¹ã«å¯Ÿããã¯ãšãªæš©éããããŸããã404: ãã®çµç¹ã«ãã® uid ã®ããã·ã¥ããŒããããŒã¿ãœãŒã¹ãã«ãŒã«ããªãããGRAFANA_URL ã®ãã¹ãééã£ãŠããŸããã¯ãšãªã§ã® 400: åŒããã®ããŒã¿ãœãŒã¹ã§ã¯ç¡å¹ã§ããçç±ã¯ã¡ãã»ãŒãžã«ç€ºãããŸãã
ãã®ã³ãã¯ã¿ã¯ãããã·ã¥ããŒããããŒã¿ãœãŒã¹ãã¢ã©ãŒãã«ãŒã«ãã³ã³ã¿ã¯ããã€ã³ãããµã€ã¬ã³ã¹ããŠãŒã¶ãŒã®äœæã倿Žãè¡ãããäœãåé€ãããGrafana OnCallãGrafana IncidentãGrafana Cloud ã®ã¹ã¿ã㯠API ã«ã¯å¯Ÿå¿ããŠããŸããã
ã¹ããã 2 â ã¢ããã¿ãŒãã€ã³ã¹ããŒã«
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
ã¹ããã 3 â ChatGPT ã«ã³ãã¯ã¿ã远å
ãµãŒããŒURL: AnythingMCP ã§ MCP Servers ãéãããã®ã³ãã¯ã¿ããããµãŒããŒãéžãã§ URLïŒ
https://cloud.anythingmcp.com/mcp/âŠïŒãã³ããŒããŸãããã®ã¬ã€ãã§YOUR_SERVER_IDãšè¡šç€ºãããŠããç®æã«äœ¿ã£ãŠãã ããã
ChatGPT ã§ã¯ãWeb çã® Plugins ããŒãžãã MCP ãµãŒããŒããã©ã°ã€ã³ãšããŠè¿œå ããŸããææãã©ã³ã§å©çšã§ããéçºè ã¢ãŒãã¯ããå¿ èŠãããŸãããBusiness ã¯ãŒã¯ã¹ããŒã¹ã§è¿œå ã§ããã®ã¯ç®¡çè ãšãªãŒããŒã ãã§ããEnterpriseã»Edu ã§ã¯ã管çè ã Create plugins with MCPs æš©éãä»äžã§ããŸãã
- chatgpt.com/plugins ãéããAdd ãã¯ãªãã¯ã㊠Add custom MCP server ãéžã³ãŸãã
- ååãå
¥åããŸãïŒäŸ: Name:
GrafanaïŒã - Connection ã® Server URL ã«
https://cloud.anythingmcp.com/mcp/YOUR_SERVER_IDãå ¥åããAuthentication 㯠OAuth ã®ãŸãŸã«ããŸãã - I understand and want to continue ãéžã³ãCreate as a plugin ãã¯ãªãã¯ããŸããChatGPT ã«æ±ããããã AnythingMCP ã«ãµã€ã³ã€ã³ããã¢ã¯ã»ã¹ãèš±å¯ããŸãã
- å人çšãã©ã°ã€ã³ããæ°ãããã©ã°ã€ã³ãã€ã³ã¹ããŒã«ãããã£ããã§ @ ãå ¥åããŠéžæããŸãã
å©çšå¯èœãªããŒã«
| Tool | What it does |
|---|---|
grafana_get_health | Check that the Grafana instance is up: database state, Grafana version and commit |
grafana_get_current_org | Read the Grafana organization the service account token belongs to: id and name |
grafana_search | Search dashboards and folders by title, tag or folder: uid, title, type (dash-db for dashboards, dash-folder for folders), tags, folder and⊠|
grafana_list_folders | List folders: uid and title, top level by default or the subfolders of a parent |
grafana_get_dashboard | Read a dashboard by uid in a compact form: title, tags, folder, time range, variables (name, type, current value) and panels with id⊠|
grafana_list_datasources | List the data sources: uid, name, type (prometheus, loki, postgres...), URL, access mode and which one is the default |
grafana_get_datasource | Read one data source by uid: name, type, URL, access mode, default flag and its non-secret settings (jsonData) |
grafana_query_datasource | Run a query against a data source through Grafana and return the result frames: a PromQL query for Prometheus or Mimir, a LogQL query for⊠|
grafana_list_alert_rules | List the Grafana-managed alert rules: uid, title, folder, rule group, paused or not, pending period (for), labels, summary, what happens on⊠|
grafana_get_alert_rule | Read one alert rule by uid: title, folder, group, condition, the queries and expressions it evaluates (data source uid, expression, time⊠|
grafana_list_firing_alerts | List the alert instances in Grafana's Alertmanager, by default the active ones (firing): alert name and labels, summary and description⊠|
grafana_list_annotations | List annotations (event markers on graphs such as deployments or incidents, and alert state changes): id, time and end time (epoch⊠|
grafana_create_annotation | Add an annotation (an event marker such as a deployment, incident or maintenance window) that shows on graphs for everyone who opens the⊠|
grafana_list_org_users | List the users of the organization: user id, login, email, name, role (Viewer, Editor, Admin), last seen and disabled flag |
grafana_search_teams | Search the teams of the organization: id, uid, name, email and member count |
grafana_list_contact_points | List the alerting contact points (where notifications go): uid, name, integration type (email, slack, pagerduty, webhook...) and whether⊠|
ããã³ããã®äŸ
- ãGrafana ã§ä»çºç«ããŠããã¢ã©ãŒãã¯ã©ãã§ããïŒããããã«ã€ããŠãå ã«ãªã£ãŠããã«ãŒã«ãšãéç¥ãåãåãã³ã³ã¿ã¯ããã€ã³ããèŠããŠãã ãããã
- ãAPI ã¬ã€ãã³ã·ã®ããã·ã¥ããŒããæ¢ããŠãåããã«ãäœã衚瀺ããã©ã®ã¯ãšãªãå®è¡ããŠãããã説æããŠãã ãããã
- ãPrometheus ã§ãçŽè¿ 1 æéã®ãµãŒãã¹ããšã® 5xx ã¬ã¹ãã³ã¹ã®ã¬ãŒãã調ã¹ãŠãæãç¶æ ã®æªããµãŒãã¹ãæããŠãã ãããã
- ãcheckout ã¢ããªã«ã€ã㊠Loki ãçŽè¿ 30 åéã«èšé²ãããšã©ãŒè¡ãèŠããŠãã¡ãã»ãŒãžããšã«ãŸãšããŠãã ãããã
- ã仿¥ã® 14:05 ã«ãã¿ã° deploy ãä»ããŠã¢ãããŒã·ã§ã³ãDeployed v2.4.1ãã远å ããŠãã ããã远å ããåã«ããã¹ããæå»ãã¿ã°ãèŠããŠãã ãããã
FAQ
ChatGPT ã®ç¡æãã©ã³ã§ã«ã¹ã¿ã MCP ãµãŒããŒã¯äœ¿ããŸãã? OpenAI ãã«ã¹ã¿ã MCP ãµãŒããŒãæ¡å ããŠããã®ã¯ææãã©ã³ã ãã§ãFree ãã©ã³ã¯å¯Ÿè±¡ã«å«ãŸããŠããŸããã
次ã®ã¹ããã
- ã³ãã¯ã¿ã®ã©ã³ãã£ã³ã°
- Claude ã«æ¥ç¶
- Cursor ã«æ¥ç¶
- Gemini ã«æ¥ç¶
- Meta Muse ã«æ¥ç¶
- Microsoft Copilot ã«æ¥ç¶
ãã®ã¬ã€ãã¯åœ¹ã«ç«ã¡ãŸããã?