|
36 | 36 | "snapshot", |
37 | 37 | } |
38 | 38 |
|
| 39 | + // prometheusToolset contains all the tools to interact with standard prometheus through the HTTP API. |
39 | 40 | prometheusToolset = map[string]server.ServerTool{ |
40 | 41 | "alertmanagers": {Tool: prometheusAlertmanagersTool, Handler: prometheusAlertmanagersToolHandler}, |
41 | 42 | "build_info": {Tool: prometheusBuildinfoTool, Handler: prometheusBuildinfoToolHandler}, |
|
63 | 64 | "wal_replay_status": {Tool: prometheusWalReplayTool, Handler: prometheusWalReplayToolHandler}, |
64 | 65 | } |
65 | 66 |
|
| 67 | + // thanosToolset contains all the tools to interact with thanos as a |
| 68 | + // prometheus HTTP API compatible backend. |
| 69 | + // |
| 70 | + // Currently, the only difference between thanosToolset and |
| 71 | + // prometheusToolset is that thanosToolset has the following tools |
| 72 | + // removed because they are not implemented in Thanos and return 404s: |
| 73 | + // [alertmanagers, config, wal_replay_status]. |
| 74 | + thanosToolset = map[string]server.ServerTool{ |
| 75 | + "build_info": {Tool: prometheusBuildinfoTool, Handler: prometheusBuildinfoToolHandler}, |
| 76 | + "clean_tombstones": {Tool: prometheusCleanTombstonesTool, Handler: prometheusCleanTombstonesToolHandler}, |
| 77 | + "delete_series": {Tool: prometheusDeleteSeriesTool, Handler: prometheusDeleteSeriesToolHandler}, |
| 78 | + "docs_list": {Tool: prometheusDocsListTool, Handler: prometheusDocsListToolHandler}, |
| 79 | + "docs_read": {Tool: prometheusDocsReadTool, Handler: prometheusDocsReadToolHandler}, |
| 80 | + "docs_search": {Tool: prometheusDocsSearchTool, Handler: prometheusDocsSearchToolHandler}, |
| 81 | + "exemplar_query": {Tool: prometheusExemplarQueryTool, Handler: prometheusExemplarQueryToolHandler}, |
| 82 | + "flags": {Tool: prometheusFlagsTool, Handler: prometheusFlagsToolHandler}, |
| 83 | + "label_names": {Tool: prometheusLabelNamesTool, Handler: prometheusLabelNamesToolHandler}, |
| 84 | + "label_values": {Tool: prometheusLabelValuesTool, Handler: prometheusLabelValuesToolHandler}, |
| 85 | + "list_alerts": {Tool: prometheusListAlertsTool, Handler: prometheusListAlertsToolHandler}, |
| 86 | + "list_rules": {Tool: prometheusRulesTool, Handler: prometheusRulesToolHandler}, |
| 87 | + "metric_metadata": {Tool: prometheusMetricMetadataTool, Handler: prometheusMetricMetadataToolHandler}, |
| 88 | + "query": {Tool: prometheusQueryTool, Handler: prometheusQueryToolHandler}, |
| 89 | + "range_query": {Tool: prometheusRangeQueryTool, Handler: prometheusRangeQueryToolHandler}, |
| 90 | + "runtime_info": {Tool: prometheusRuntimeinfoTool, Handler: prometheusRuntimeinfoToolHandler}, |
| 91 | + "series": {Tool: prometheusSeriesTool, Handler: prometheusSeriesToolHandler}, |
| 92 | + "snapshot": {Tool: prometheusSnapshotTool, Handler: prometheusSnapshotToolHandler}, |
| 93 | + "targets_metadata": {Tool: prometheusTargetsMetadataTool, Handler: prometheusTargetsMetadataToolHandler}, |
| 94 | + "list_targets": {Tool: prometheusTargetsTool, Handler: prometheusTargetsToolHandler}, |
| 95 | + "tsdb_stats": {Tool: prometheusTsdbStatsTool, Handler: prometheusTsdbStatsToolHandler}, |
| 96 | + } |
| 97 | + |
| 98 | + // PrometheusBackends is a list of directly supported Prometheus API |
| 99 | + // compatible backends. Backends other than prometheus itself may |
| 100 | + // expose a different set of tools more tailored to the backend and/or |
| 101 | + // change functionality of existing tools. |
| 102 | + PrometheusBackends = []string{ |
| 103 | + "prometheus", |
| 104 | + "thanos", |
| 105 | + } |
| 106 | + |
66 | 107 | // Tools Definitions. |
67 | 108 |
|
68 | 109 | // Tools for Prometheus API. |
|
0 commit comments