UNPKG

@takashito/linode-mcp-server

Version:

MCP server for Linode API

138 lines 6.71 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createMonitorClient = createMonitorClient; function createMonitorClient(axios) { return { // Alert channels getNotificationChannels: async (params) => { const response = await axios.get('https://api.linode.com/v4beta/monitor/alert-channels', { params }); return response.data; }, getNotificationChannel: async (channelId) => { const response = await axios.get(`https://api.linode.com/v4beta/monitor/alert-channels/${channelId}`); return response.data; }, createNotificationChannel: async (data) => { const response = await axios.post('https://api.linode.com/v4beta/monitor/alert-channels', data); return response.data; }, updateNotificationChannel: async (channelId, data) => { const response = await axios.put(`https://api.linode.com/v4beta/monitor/alert-channels/${channelId}`, data); return response.data; }, deleteNotificationChannel: async (channelId) => { await axios.delete(`https://api.linode.com/v4beta/monitor/alert-channels/${channelId}`); }, getChannelAlerts: async (channelId, params) => { const response = await axios.get(`https://api.linode.com/v4beta/monitor/alert-channels/${channelId}/alerts`, { params }); return response.data; }, // Alert definitions getAlertDefinitions: async (params) => { const response = await axios.get('https://api.linode.com/v4beta/monitor/alert-definitions', { params }); return response.data; }, getServiceAlertDefinitions: async (serviceType, params) => { const response = await axios.get(`https://api.linode.com/v4beta/monitor/services/${serviceType}/alert-definitions`, { params }); return response.data; }, getAlertDefinition: async (serviceType, alertId) => { const response = await axios.get(`https://api.linode.com/v4beta/monitor/services/${serviceType}/alert-definitions/${alertId}`); return response.data; }, createAlertDefinition: async (serviceType, data) => { const response = await axios.post(`https://api.linode.com/v4beta/monitor/services/${serviceType}/alert-definitions`, data); return response.data; }, updateAlertDefinition: async (serviceType, alertId, data) => { const response = await axios.put(`https://api.linode.com/v4beta/monitor/services/${serviceType}/alert-definitions/${alertId}`, data); return response.data; }, deleteAlertDefinition: async (serviceType, alertId) => { await axios.delete(`https://api.linode.com/v4beta/monitor/services/${serviceType}/alert-definitions/${alertId}`); }, // Log streams getLogStreams: async (params) => { const response = await axios.get('/monitor/streams', { params }); return response.data; }, getLogStream: async (streamId) => { const response = await axios.get(`/monitor/streams/${streamId}`); return response.data; }, createLogStream: async (data) => { const response = await axios.post('/monitor/streams', data); return response.data; }, updateLogStream: async (streamId, data) => { const response = await axios.put(`/monitor/streams/${streamId}`, data); return response.data; }, deleteLogStream: async (streamId) => { await axios.delete(`/monitor/streams/${streamId}`); }, getLogStreamHistory: async (streamId, params) => { const response = await axios.get(`/monitor/streams/${streamId}/history`, { params }); return response.data; }, // Log destinations getLogDestinations: async (params) => { const response = await axios.get('/monitor/streams/destinations', { params }); return response.data; }, getLogDestination: async (destinationId) => { const response = await axios.get(`/monitor/streams/destinations/${destinationId}`); return response.data; }, createLogDestination: async (data) => { const response = await axios.post('/monitor/streams/destinations', data); return response.data; }, updateLogDestination: async (destinationId, data) => { const response = await axios.put(`/monitor/streams/destinations/${destinationId}`, data); return response.data; }, deleteLogDestination: async (destinationId) => { await axios.delete(`/monitor/streams/destinations/${destinationId}`); }, getLogDestinationHistory: async (destinationId, params) => { const response = await axios.get(`/monitor/streams/destinations/${destinationId}/history`, { params }); return response.data; }, // Dashboards listDashboards: async (params) => { const response = await axios.get('/monitor/dashboards', { params }); return response.data; }, getDashboard: async (dashboardId) => { const response = await axios.get(`/monitor/dashboards/${dashboardId}`); return response.data; }, // Services & metrics listServices: async (params) => { const response = await axios.get('/monitor/services', { params }); return response.data; }, getService: async (serviceType) => { const response = await axios.get(`/monitor/services/${serviceType}`); return response.data; }, listServiceDashboards: async (serviceType, params) => { const response = await axios.get(`/monitor/services/${serviceType}/dashboards`, { params }); return response.data; }, listServiceMetricDefinitions: async (serviceType) => { const response = await axios.get(`/monitor/services/${serviceType}/metric-definitions`); return response.data; }, getServiceMetrics: async (serviceType, data) => { const response = await axios.post(`/monitor/services/${serviceType}/metrics`, data); return response.data; }, createServiceToken: async (serviceType) => { const response = await axios.post(`/monitor/services/${serviceType}/token`); return response.data; }, }; } //# sourceMappingURL=monitor.js.map