LogicMonitor.Datamart
3.212.1
See the version list below for details.
dotnet add package LogicMonitor.Datamart --version 3.212.1
NuGet\Install-Package LogicMonitor.Datamart -Version 3.212.1
<PackageReference Include="LogicMonitor.Datamart" Version="3.212.1" />
paket add LogicMonitor.Datamart --version 3.212.1
#r "nuget: LogicMonitor.Datamart, 3.212.1"
// Install LogicMonitor.Datamart as a Cake Addin #addin nuget:?package=LogicMonitor.Datamart&version=3.212.1 // Install LogicMonitor.Datamart as a Cake Tool #tool nuget:?package=LogicMonitor.Datamart&version=3.212.1
Introduction
Purpose
The LogicMonitor Datamart creates a copy of major aspects of your LogicMonitor system in a SQL Server or PostgreSQL database, including:
- Dimension data
- Alert history
- Audit log history
- Time Series data aggregations
Support
- Customers with an active project and available hours can request support via your project manager.
- Otherwise, support is provided on a best-effort basis via the Panoramic Data Community.
- The LogicMonitor Datamart is provided as-is, with no warranty or guarantee of support.
Installation
Prerequisites
LogicMonitor Account
- You will need an API key and ID to access the LogicMonitor API.
- Create these in the LogicMonitor UI under Settings > Users > API Tokens.
- We recommend creating a separate user for this purpose.
- Full read permissions, including LogicModule access, are required.
Database Server
- Supported databases: PostgreSQL and SQL Server.
- Note: Table partitioning is not available in lower SQL Server tiers, such as SQL Server Express.
- The database server must be accessible from the container.
Docker Environment
- Step-by-step instructions are provided for Docker Desktop on Windows.
- Basic understanding of Docker and container management is assumed.
Configuration File
- An example configuration file is provided here: appsettings.example.json.
- Modify this file to include your API credentials, database connection information, and data mart configuration.
- Ensure the configuration file is accessible from the container.
Configuration file - quick start
The configuration file can get quite complex. Full documentation can be found at the bottom of this page.
To start with, we recommend using the example configuration file and modifying just the following:
- LogicMonitorClientOptions
- Account
- The first part of your LogicMonitor portal URL, e.g. "acme" for "acme.logicmonitor.com".
- AccessId
- The access ID of your LogicMonitor API user.
- AccessKey
- The access key of your LogicMonitor API user.
- Account
- DatabaseType
- Set to "SqlServer" or "Postgres"
- DatabaseName
- The name of the database to use.
- DatabaseUsername
- The username to use when connecting to the database.
- This user should have full rights to the database, for example db_owner for SQL Server.
- We recommend creating a new user for this purpose.
- DatabasePassword
- The password to use when connecting to the database.
Docker container
Steps:
Prepare your local
appsettings.json
file: Ensure you have a localappsettings.json
file, which the container will use. See above for an example configuration file.For example, let's assume the file is located at
/path/to/your/appsettings.json
.Run the Docker container with a volume mount: Use Docker's
-v
flag to mount your local file into the container. Set the environment variableCONFIG_FILE
to point to the mounted file inside the container.Example command (on Windows):
docker run -d --name lm_datamart_panoramicdata -p 5000:8080 -v C:\Users\david\Projects\lmdm_docker\appsettings.json:/app/appsettings.json -e CONFIG_FILE=/app/appsettings.json panoramicdata/logicmonitor-datamart:latest
-d
: This runs the container in detached mode.--name lm_datamart_panoramicdata
: This gives the container a name.-p 5000:8080
: This maps port 8080 inside the container to port 5000 on the host.-v /path/to/your/appsettings.json:/app/appsettings.json
: This mounts your localappsettings.json
file into the container at/app/appsettings.json
.-e CONFIG_FILE=/app/appsettings.json
: This sets theCONFIG_FILE
environment variable to tell the container where the configuration file is located.panoramicdata/logicmonitor-datamart:latest
: This is the name of the Docker image to run.
Explanation:
- Your local
appsettings.json
file is mounted inside the container at/app/appsettings.json
. - The application inside the container reads the configuration from the file specified by the
CONFIG_FILE
environment variable.
- Your local
Verify the container: You can verify that the container is running and using the correct configuration file by checking the logs:
docker logs <container-id>
Replace <container-id>
with the ID of your running container (which you can get by running docker ps
).
- Monitor the container:
You can monitor the container by visiting
http://localhost:5000/health
in your browser.
For developers
Developers can use the LogicMonitor.Datamart nuget package to create their own data mart. The package is available on nuget.org and is licensed under the MIT license.
Contributors
Contributions are welcome.
Configuration file - full documentation
Basic configuration
- Name
- This is just a name for the configuration. Optional.
LogicMonitor configuration
-
- DataSources
- A list of data sources for which time series data will be collected.
- Each data source should have the following specified:
- Name
- The UNIQUE name of the data source in LogicMonitor.
- InstanceInclusionExpression
- An Extended NCalc expression. If that scares you, just leave it as the default string: "true".
- DataPoints: A list of data points to collect for this data source.
- Name
- The name of the data point in LogicMonitor from the "Raw Data" view.
- Description
- A description of the data point.
- GraphName
- The name of the graph in LogicMonitor.
- Leave as null.
- MeasurementUnit
- The unit of measurement for the data point.
- LogicMonitor don't provide this in-product, so you'll need to work it out by reading the DataSource's source code.
- PercentageAvailabilityCalculation
- Another NCalc.
- Leave it as "" or contact us for support.
- GlobalAlertExpression
- Use this to override LogicMonitor's alerting logic.
- Leave as "" or contact us for support.
- Calculation
- Another NCalc.
- Leave it as "" or contact us for support.
- Tags
- The tags to apply to the data point.
- These are directly entered into the database, so you can use any string you like.
- Property1, Property2...
- Up to 20 available.
- These are copied from the LogicMonitor Resource's properties if available.
- InstanceDataPointProperty1, Property2...
- Up to 20 available.
- These are copied from the LogicMonitor ResourceDataSourceInstance's properties if available.
- ResyncTimeSeriesData
- If true, the time series data for this data point will be re-collected.
- This is useful if you've changed the data point's configuration in LogicMonitor.
- Name
- Name
- DataSources
- AggregationReset
- If you're resetting all aggregations, set this to true.
- This will delete all existing aggregations for this DataPoint.
- If you're NOT resetting aggregations, set this to false.
- StartTimeUtc
- This is the time from which time series data will be collected.
- Must be midnight on a month boundary, e.g. 2024-01-01
- Should be set the first time you run the data mart.
- Be cautious not to set this too far back, as it will collect a lot of data.
- Depending on the amount of data, the first run could take up to a week, so be prepared for that!
- You cannot backfill data before existing time-series data.
- LogicMonitorClientOptions
- Account
- The name of your LogicMonitor account.
- AccessId
- The access ID of your LogicMonitor API user.
- AccessKey
- The access key of your LogicMonitor API user.
- Account
Database configuration
- DatabaseType
- The type of database you are using.
- Options are "SqlServer" or "Postgres".
- DatabaseServerName
- The IP address or DNS name of the database server.
- If connecting to a database running on the container host, you should use the special hostname
host.docker.internal
, and not 'localhost' or '127.0.0.1'.
- DatabaseServerPort
- The port on which the database server is listening.
- Default is 1433 for SQL Server and 5432 for PostgreSQL.
- DatabaseRetryOnFailureCount
- The number of times to retry a failed database operation.
- Default is 0.
- SqlServerAuthenticationMethod
- The authentication method to use when connecting to SQL Server.
- Options are documented in the Microsoft Docs.
- DatabaseName
- The name of the database to use.
- We recommend creating a new database for the data mart and ensuring that your LogicMonitor portal name is included in the database name.
- For example, if your LogicMonitor portal is
acme
, you could name the databaseLogicMonitor_acme
. - This is important if you are running multiple data marts for different portals.
- DatabaseUsername
- The username to use when connecting to the database.
- DatabasePassword
- The password to use when connecting to the database.
- SqlCommandTimeoutSeconds
- The number of seconds to wait before a SQL command times out.
- Default is 600.
- SqlBulkCopyTimeoutSeconds
- The number of seconds to wait before a SQL bulk copy operation times out.
- Default is 600.
- EnableSensitiveDatabaseLogging
- If true, sensitive database information will be logged.
- Default is false.
- DeviceDataSourceInstanceBatchSize
- The number of DeviceDataSourceInstances to process in a batch.
- Default is 100.
- DeviceProperties
- A list of properties to collect from the LogicMonitor API.
- These are copied from the LogicMonitor Resource's properties.
- Up to 20 properties can be collected.
- DimensionSyncHaltOnError
- If true, the dimension sync will halt on error.
- Default is true.
- MinutesOffset
- The number of minutes to offset the time series data.
- Default is 0.
- FakeExecutionTime
- If set, the data mart will use this time instead of the current time.
- This is useful for testing.
- Default is null.
Logging configuration (Serilog)
We use Serilog for logging. Sink DLLs are included for:
- Application Insights
- Azure Analytics
- Console
- ElasticSearch
See the Serilog documentation for more information.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- AutoMapper (>= 13.0.1)
- EFCore.BulkExtensions (>= 8.1.1)
- Humanizer.Core (>= 2.14.1)
- LogicMonitor.Api (>= 3.212.5)
- Microsoft.Data.SqlClient (>= 5.2.2)
- Microsoft.EntityFrameworkCore.InMemory (>= 8.0.10)
- Microsoft.EntityFrameworkCore.SqlServer (>= 8.0.10)
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 8.0.10)
- PanoramicData.NCalcExtensions (>= 3.1.19)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.213.1 | 31 | 11/30/2024 |
3.212.3 | 123 | 11/13/2024 |
3.212.1 | 77 | 11/12/2024 |
3.211.41 | 142 | 11/12/2024 |
3.211.36 | 162 | 10/22/2024 |
3.211.9 | 90 | 10/21/2024 |
3.211.8 | 134 | 10/9/2024 |
3.211.6 | 110 | 10/8/2024 |
3.211.5 | 108 | 10/1/2024 |
3.211.2 | 122 | 9/29/2024 |
3.209.2 | 188 | 9/3/2024 |
3.209.1 | 115 | 8/31/2024 |
3.204.25 | 114 | 8/27/2024 |
3.204.24 | 136 | 8/16/2024 |
3.204.22 | 86 | 8/5/2024 |
3.204.19 | 84 | 7/25/2024 |
3.204.18 | 140 | 7/4/2024 |
3.204.17 | 86 | 7/4/2024 |
3.204.13 | 103 | 6/24/2024 |
3.204.12 | 115 | 6/11/2024 |
3.204.11 | 89 | 6/11/2024 |
3.204.10 | 112 | 6/7/2024 |
3.204.5 | 94 | 6/3/2024 |
3.204.3 | 71 | 6/3/2024 |
3.204.2 | 78 | 6/3/2024 |
3.204.1 | 89 | 5/30/2024 |
3.203.10 | 94 | 5/30/2024 |
3.203.9 | 120 | 5/26/2024 |
3.203.8 | 110 | 5/17/2024 |
3.203.7 | 91 | 5/13/2024 |
3.203.4 | 98 | 5/10/2024 |
3.203.3 | 84 | 5/10/2024 |
3.203.2 | 75 | 5/10/2024 |
3.203.1 | 95 | 5/9/2024 |
3.201.22 | 95 | 5/8/2024 |
3.201.21 | 147 | 4/25/2024 |
3.201.19 | 127 | 4/25/2024 |
3.201.18 | 116 | 4/21/2024 |
3.201.17 | 132 | 4/16/2024 |
3.201.16 | 124 | 4/16/2024 |
3.201.14 | 118 | 4/16/2024 |
3.201.12 | 130 | 4/4/2024 |
3.201.7 | 136 | 3/26/2024 |
3.201.5 | 113 | 3/25/2024 |
3.201.4 | 119 | 3/20/2024 |
3.201.3 | 125 | 3/20/2024 |
3.201.2 | 120 | 3/16/2024 |
3.201.1 | 117 | 3/8/2024 |
3.198.22 | 135 | 3/1/2024 |
3.198.20 | 100 | 2/14/2024 |
3.198.19 | 92 | 2/13/2024 |
3.198.16 | 73 | 2/12/2024 |
3.198.8 | 83 | 2/7/2024 |
3.198.5 | 75 | 2/5/2024 |
3.198.4 | 72 | 2/5/2024 |
3.198.3 | 76 | 2/2/2024 |
3.198.2 | 81 | 1/30/2024 |
3.198.1 | 83 | 1/23/2024 |
3.197.9 | 89 | 1/17/2024 |
3.197.3 | 87 | 1/10/2024 |
3.197.1 | 87 | 1/2/2024 |
3.196.1 | 126 | 12/8/2023 |
3.191.15 | 121 | 11/15/2023 |
3.191.8 | 177 | 10/27/2023 |
3.191.7 | 132 | 10/23/2023 |
3.191.6 | 126 | 10/23/2023 |
3.191.4 | 243 | 8/29/2023 |
3.191.2 | 137 | 8/25/2023 |
3.191.1 | 149 | 8/23/2023 |
3.183.70 | 148 | 8/7/2023 |
3.183.67 | 137 | 8/3/2023 |
3.183.66 | 144 | 8/3/2023 |
3.183.65 | 134 | 8/3/2023 |
3.183.64 | 113 | 8/2/2023 |
3.183.62 | 171 | 7/21/2023 |
3.183.58 | 166 | 7/17/2023 |
3.183.56 | 161 | 7/17/2023 |
3.183.55 | 163 | 7/14/2023 |
3.183.52 | 161 | 7/11/2023 |
3.183.50 | 174 | 7/4/2023 |
3.183.49 | 156 | 7/4/2023 |
3.183.48 | 155 | 7/4/2023 |
3.183.47 | 189 | 6/8/2023 |
3.183.46 | 159 | 6/7/2023 |
3.183.43 | 162 | 5/26/2023 |
3.183.37 | 161 | 5/22/2023 |
3.183.35 | 163 | 5/16/2023 |
3.183.33 | 173 | 5/10/2023 |
3.183.32 | 176 | 5/10/2023 |
3.183.29 | 169 | 5/9/2023 |
3.183.28 | 187 | 5/1/2023 |
3.183.23 | 184 | 5/1/2023 |
3.183.20 | 189 | 4/26/2023 |
3.183.18 | 204 | 4/24/2023 |
3.183.16 | 196 | 4/20/2023 |
3.183.15 | 200 | 4/18/2023 |
3.183.13 | 193 | 4/18/2023 |
3.183.12 | 189 | 4/18/2023 |
3.183.9 | 300 | 3/24/2023 |
3.183.7 | 237 | 3/20/2023 |
3.183.6 | 239 | 3/20/2023 |
3.183.5 | 227 | 3/24/2023 |
3.183.4 | 257 | 3/20/2023 |
3.183.2 | 243 | 3/15/2023 |
3.183.1 | 243 | 3/13/2023 |
3.182.6 | 256 | 3/5/2023 |
3.182.4 | 260 | 3/3/2023 |
3.182.3 | 262 | 3/2/2023 |
3.182.2 | 263 | 3/1/2023 |
3.182.1 | 274 | 2/21/2023 |
3.0.42 | 292 | 2/5/2023 |
3.0.41 | 285 | 2/5/2023 |
3.0.40 | 266 | 2/5/2023 |
3.0.39 | 288 | 2/5/2023 |
3.0.38 | 295 | 2/5/2023 |
3.0.37 | 291 | 2/5/2023 |
3.0.35 | 325 | 1/9/2023 |
3.0.33 | 305 | 1/9/2023 |
3.0.31 | 430 | 10/31/2022 |
3.0.29 | 396 | 9/30/2022 |
3.0.11 | 571 | 3/13/2022 |
3.0.9 | 458 | 2/14/2022 |
3.0.6 | 490 | 1/31/2022 |
3.0.5 | 447 | 1/20/2022 |
3.0.2 | 289 | 1/7/2022 |
2.1.42 | 929 | 12/3/2021 |
2.1.40 | 6,726 | 11/23/2021 |
2.1.39 | 5,932 | 11/23/2021 |
2.1.38 | 5,422 | 11/23/2021 |
2.1.37 | 5,106 | 11/23/2021 |
2.1.36 | 653 | 6/22/2021 |
2.1.35 | 445 | 6/22/2021 |
2.1.34 | 448 | 6/22/2021 |
2.1.33 | 420 | 6/22/2021 |
2.1.31 | 449 | 6/21/2021 |
2.1.30 | 461 | 6/20/2021 |
2.1.28 | 521 | 6/18/2021 |
2.1.27 | 488 | 6/18/2021 |
2.1.18 | 491 | 3/26/2021 |
2.1.17 | 485 | 3/24/2021 |
2.1.16 | 433 | 2/12/2021 |
2.1.15 | 442 | 2/11/2021 |
2.1.14 | 568 | 12/1/2020 |
2.1.12 | 569 | 11/11/2020 |
2.1.11 | 585 | 10/13/2020 |
2.1.9 | 615 | 6/18/2020 |
2.1.8 | 519 | 5/29/2020 |
2.1.6 | 532 | 5/12/2020 |
2.1.5 | 566 | 5/8/2020 |
2.1.2 | 550 | 4/3/2020 |
2.0.70 | 502 | 3/26/2020 |
2.0.69 | 497 | 3/19/2020 |
2.0.67 | 510 | 3/19/2020 |
2.0.63 | 582 | 1/3/2020 |
2.0.61 | 589 | 12/6/2019 |
2.0.57 | 569 | 11/14/2019 |
2.0.53 | 549 | 11/13/2019 |
2.0.52 | 550 | 11/13/2019 |
2.0.51 | 529 | 11/13/2019 |
2.0.50 | 525 | 11/12/2019 |
2.0.49 | 525 | 11/12/2019 |
2.0.47 | 560 | 11/11/2019 |
2.0.46 | 532 | 11/11/2019 |
2.0.45 | 571 | 11/11/2019 |
2.0.44 | 535 | 11/11/2019 |
2.0.43 | 544 | 11/11/2019 |
2.0.42 | 534 | 11/11/2019 |
2.0.40-beta | 360 | 11/8/2019 |
2.0.39-beta | 340 | 11/8/2019 |
2.0.38-beta | 339 | 11/8/2019 |
2.0.37-beta | 353 | 11/8/2019 |
2.0.36-beta | 363 | 11/8/2019 |
2.0.35-beta | 353 | 11/8/2019 |
2.0.28-beta | 366 | 10/29/2019 |
2.0.25-beta | 333 | 10/29/2019 |
2.0.19-beta | 357 | 10/27/2019 |
2.0.18-beta | 363 | 10/27/2019 |
2.0.17-beta | 367 | 10/27/2019 |
2.0.8-beta | 342 | 10/24/2019 |
2.0.7-beta | 350 | 10/24/2019 |
2.0.0-beta | 349 | 11/11/2019 |
1.2.3 | 610 | 10/14/2019 |
1.2.2 | 629 | 8/30/2019 |
1.2.1 | 559 | 8/27/2019 |
1.2.0 | 620 | 4/25/2019 |
1.1.5 | 601 | 4/4/2019 |
1.1.4 | 558 | 4/4/2019 |
1.1.3 | 581 | 4/4/2019 |
1.1.2 | 578 | 4/4/2019 |
1.1.1 | 572 | 4/4/2019 |
1.1.0 | 575 | 4/4/2019 |
1.0.20 | 567 | 4/2/2019 |
1.0.19 | 580 | 4/2/2019 |
1.0.18 | 600 | 4/1/2019 |
1.0.17 | 606 | 4/1/2019 |
1.0.16 | 590 | 4/1/2019 |
1.0.15 | 589 | 4/1/2019 |
1.0.14 | 588 | 4/1/2019 |
1.0.13 | 572 | 4/1/2019 |
1.0.12 | 611 | 4/1/2019 |
1.0.11 | 600 | 3/26/2019 |
1.0.10 | 598 | 3/26/2019 |
1.0.9 | 581 | 3/26/2019 |
1.0.8 | 576 | 3/26/2019 |
1.0.7 | 587 | 3/26/2019 |
1.0.6 | 582 | 3/20/2019 |
1.0.5 | 590 | 3/20/2019 |
1.0.4 | 569 | 3/19/2019 |
1.0.3 | 571 | 3/19/2019 |
1.0.2 | 587 | 3/19/2019 |
1.0.1 | 577 | 3/19/2019 |
1.0.0 | 572 | 3/18/2019 |
Added audit events.