The LogicMonitor REST API nuget package, authored by Panoramic Data Limited.
If you want some LogicMonitor software developed, come find us at: https://www.panoramicdata.com/ !
To get started, watch the videos here:
http://www.panoramicdata.com/products/logicmonitor-api-nuget-package/
A simple example:
usingLogicMonitor.Api;[...]publicstaticasyncTaskGetAllResources(ILoggerlogger,CancellationTokencancellationToken){usingvarlogicMonitorClient=newLogicMonitorClient(newLogicMonitorClientOptions{Account="acme",AccessId="accessId",AccessKey="accessKey",Logger=logger});varresources=awaitlogicMonitorClient.GetAllAsync<Resource>(cancellationToken).ConfigureAwait(false);Console.WriteLine($"Resource Count: {resources.Count}");}The modern LogicMonitor UI exports LogicModules to JSON format. This library supports both JSON and XML export/import:
// Export a DataSource as JSON (modern UI format)varjson=awaitlogicMonitorClient.GetDataSourceJsonAsync(dataSourceId,cancellationToken);// Export a DataSource as XML (legacy format)varxml=awaitlogicMonitorClient.GetDataSourceXmlAsync(dataSourceId,cancellationToken);// Generic export by LogicModuleTypevarjson=awaitlogicMonitorClient.GetLogicModuleJsonAsync(LogicModuleType.DataSource,dataSourceId,cancellationToken);// Export to a fileawaitlogicMonitorClient.ExportLogicModuleToJsonFileAsync(LogicModuleType.DataSource,dataSourceId,"datasource.json",cancellationToken);// Import from JSON stringvarimported=awaitlogicMonitorClient.ImportDataSourceJsonAsync(json,cancellationToken);// Import from filevarimported=awaitlogicMonitorClient.ImportDataSourceFromJsonFileAsync("datasource.json",cancellationToken);Supported LogicModule types for export/import:
- DataSource
- EventSource
- ConfigSource
- PropertySource
- TopologySource
- JobMonitor
- AppliesToFunction
LM Uptime is LogicMonitor's replacement for the legacy Websites product. This library provides a strongly-typed surface for creating and managing internal/external ping and web checks as first-class resources. See docs/UptimeResources.md for a detailed guide, including how it is backed by Resources and custom properties.
usingLogicMonitor.Api.Resources.Uptime;varpingCheck=awaitlogicMonitorClient.CreateAsync(newPingCheckResourceCreationDto{Name="dns-google-ping",HostName="8.8.8.8",PreferredCollectorId=collectorId,SyntheticsCollectorIds=[collectorId],TestLocation=newUptimeTestLocation{CollectorIds=[collectorId]}},cancellationToken);varfetched=awaitlogicMonitorClient.GetAsync<PingCheckResource>(pingCheck.Id,cancellationToken);For more information on the LogicMonitor REST API, see the official documentation.
This project is licensed under the MIT License - see the LICENSE file for details.