LogicMonitor.Datamart 3.213.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package LogicMonitor.Datamart --version 3.213.1                
NuGet\Install-Package LogicMonitor.Datamart -Version 3.213.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LogicMonitor.Datamart" Version="3.213.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LogicMonitor.Datamart --version 3.213.1                
#r "nuget: LogicMonitor.Datamart, 3.213.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LogicMonitor.Datamart as a Cake Addin
#addin nuget:?package=LogicMonitor.Datamart&version=3.213.1

// Install LogicMonitor.Datamart as a Cake Tool
#tool nuget:?package=LogicMonitor.Datamart&version=3.213.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

  1. 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.
  2. 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.
  3. Docker Environment

    • Step-by-step instructions are provided for Docker Desktop on Windows.
    • Basic understanding of Docker and container management is assumed.
  4. 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.
  • 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:

  1. Prepare your local appsettings.json file: Ensure you have a local appsettings.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.

  2. Run the Docker container with a volume mount: Use Docker's -v flag to mount your local file into the container. Set the environment variable CONFIG_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 local appsettings.json file into the container at /app/appsettings.json.
  • -e CONFIG_FILE=/app/appsettings.json: This sets the CONFIG_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.
  1. 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.
  2. 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).

  1. 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
        • 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.
  • 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.

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 database LogicMonitor_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 Compatible and additional computed target framework versions.
.NET net9.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.3 99 12/10/2024
3.213.2 125 12/5/2024
3.213.1 103 11/30/2024
3.212.3 134 11/13/2024
3.212.1 88 11/12/2024
3.211.41 157 11/12/2024
3.211.36 168 10/22/2024
3.211.9 94 10/21/2024
3.211.8 140 10/9/2024
3.211.6 116 10/8/2024
3.211.5 114 10/1/2024
3.211.2 128 9/29/2024
3.209.2 195 9/3/2024
3.209.1 121 8/31/2024
3.204.25 118 8/27/2024
3.204.24 142 8/16/2024
3.204.22 90 8/5/2024
3.204.19 88 7/25/2024
3.204.18 148 7/4/2024
3.204.17 92 7/4/2024
3.204.13 109 6/24/2024
3.204.12 121 6/11/2024
3.204.11 93 6/11/2024
3.204.10 118 6/7/2024
3.204.5 98 6/3/2024
3.204.3 77 6/3/2024
3.204.2 82 6/3/2024
3.204.1 97 5/30/2024
3.203.10 100 5/30/2024
3.203.9 124 5/26/2024
3.203.8 114 5/17/2024
3.203.7 97 5/13/2024
3.203.4 104 5/10/2024
3.203.3 88 5/10/2024
3.203.2 83 5/10/2024
3.203.1 103 5/9/2024
3.201.22 99 5/8/2024
3.201.21 151 4/25/2024
3.201.19 129 4/25/2024
3.201.18 118 4/21/2024
3.201.17 134 4/16/2024
3.201.16 128 4/16/2024
3.201.14 120 4/16/2024
3.201.12 132 4/4/2024
3.201.7 138 3/26/2024
3.201.5 115 3/25/2024
3.201.4 121 3/20/2024
3.201.3 127 3/20/2024
3.201.2 122 3/16/2024
3.201.1 121 3/8/2024
3.198.22 137 3/1/2024
3.198.20 106 2/14/2024
3.198.19 94 2/13/2024
3.198.16 79 2/12/2024
3.198.8 85 2/7/2024
3.198.5 77 2/5/2024
3.198.4 74 2/5/2024
3.198.3 78 2/2/2024
3.198.2 83 1/30/2024
3.198.1 85 1/23/2024
3.197.9 93 1/17/2024
3.197.3 89 1/10/2024
3.197.1 89 1/2/2024
3.196.1 128 12/8/2023
3.191.15 123 11/15/2023
3.191.8 179 10/27/2023
3.191.7 134 10/23/2023
3.191.6 128 10/23/2023
3.191.4 245 8/29/2023
3.191.2 139 8/25/2023
3.191.1 151 8/23/2023
3.183.70 150 8/7/2023
3.183.67 139 8/3/2023
3.183.66 146 8/3/2023
3.183.65 136 8/3/2023
3.183.64 115 8/2/2023
3.183.62 173 7/21/2023
3.183.58 168 7/17/2023
3.183.56 163 7/17/2023
3.183.55 165 7/14/2023
3.183.52 163 7/11/2023
3.183.50 176 7/4/2023
3.183.49 160 7/4/2023
3.183.48 157 7/4/2023
3.183.47 191 6/8/2023
3.183.46 163 6/7/2023
3.183.43 166 5/26/2023
3.183.37 163 5/22/2023
3.183.35 165 5/16/2023
3.183.33 175 5/10/2023
3.183.32 180 5/10/2023
3.183.29 173 5/9/2023
3.183.28 191 5/1/2023
3.183.23 188 5/1/2023
3.183.20 191 4/26/2023
3.183.18 210 4/24/2023
3.183.16 198 4/20/2023
3.183.15 204 4/18/2023
3.183.13 197 4/18/2023
3.183.12 191 4/18/2023
3.183.9 304 3/24/2023
3.183.7 241 3/20/2023
3.183.6 241 3/20/2023
3.183.5 231 3/24/2023
3.183.4 259 3/20/2023
3.183.2 245 3/15/2023
3.183.1 245 3/13/2023
3.182.6 258 3/5/2023
3.182.4 262 3/3/2023
3.182.3 264 3/2/2023
3.182.2 267 3/1/2023
3.182.1 276 2/21/2023
3.0.42 294 2/5/2023
3.0.41 287 2/5/2023
3.0.40 268 2/5/2023
3.0.39 290 2/5/2023
3.0.38 299 2/5/2023
3.0.37 293 2/5/2023
3.0.35 329 1/9/2023
3.0.33 309 1/9/2023
3.0.31 436 10/31/2022
3.0.29 402 9/30/2022
3.0.11 577 3/13/2022
3.0.9 462 2/14/2022
3.0.6 496 1/31/2022
3.0.5 454 1/20/2022
3.0.2 295 1/7/2022
2.1.42 933 12/3/2021
2.1.40 6,732 11/23/2021
2.1.39 5,936 11/23/2021
2.1.38 5,426 11/23/2021
2.1.37 5,110 11/23/2021
2.1.36 657 6/22/2021
2.1.35 449 6/22/2021
2.1.34 454 6/22/2021
2.1.33 424 6/22/2021
2.1.31 453 6/21/2021
2.1.30 465 6/20/2021
2.1.28 525 6/18/2021
2.1.27 492 6/18/2021
2.1.18 497 3/26/2021
2.1.17 493 3/24/2021
2.1.16 437 2/12/2021
2.1.15 446 2/11/2021
2.1.14 573 12/1/2020
2.1.12 575 11/11/2020
2.1.11 593 10/13/2020
2.1.9 623 6/18/2020
2.1.8 525 5/29/2020
2.1.6 536 5/12/2020
2.1.5 570 5/8/2020
2.1.2 556 4/3/2020
2.0.70 508 3/26/2020
2.0.69 503 3/19/2020
2.0.67 516 3/19/2020
2.0.63 586 1/3/2020
2.0.61 595 12/6/2019
2.0.57 573 11/14/2019
2.0.53 553 11/13/2019
2.0.52 554 11/13/2019
2.0.51 533 11/13/2019
2.0.50 529 11/12/2019
2.0.49 529 11/12/2019
2.0.47 564 11/11/2019
2.0.46 536 11/11/2019
2.0.45 575 11/11/2019
2.0.44 539 11/11/2019
2.0.43 548 11/11/2019
2.0.42 541 11/11/2019
2.0.40-beta 362 11/8/2019
2.0.39-beta 342 11/8/2019
2.0.38-beta 341 11/8/2019
2.0.37-beta 355 11/8/2019
2.0.36-beta 365 11/8/2019
2.0.35-beta 355 11/8/2019
2.0.28-beta 368 10/29/2019
2.0.25-beta 335 10/29/2019
2.0.19-beta 359 10/27/2019
2.0.18-beta 365 10/27/2019
2.0.17-beta 369 10/27/2019
2.0.8-beta 344 10/24/2019
2.0.7-beta 352 10/24/2019
2.0.0-beta 351 11/11/2019
1.2.3 614 10/14/2019
1.2.2 633 8/30/2019
1.2.1 563 8/27/2019
1.2.0 624 4/25/2019
1.1.5 607 4/4/2019
1.1.4 564 4/4/2019
1.1.3 585 4/4/2019
1.1.2 582 4/4/2019
1.1.1 576 4/4/2019
1.1.0 579 4/4/2019
1.0.20 571 4/2/2019
1.0.19 584 4/2/2019
1.0.18 604 4/1/2019
1.0.17 610 4/1/2019
1.0.16 594 4/1/2019
1.0.15 593 4/1/2019
1.0.14 592 4/1/2019
1.0.13 576 4/1/2019
1.0.12 615 4/1/2019
1.0.11 604 3/26/2019
1.0.10 602 3/26/2019
1.0.9 585 3/26/2019
1.0.8 580 3/26/2019
1.0.7 591 3/26/2019
1.0.6 587 3/20/2019
1.0.5 594 3/20/2019
1.0.4 574 3/19/2019
1.0.3 574 3/19/2019
1.0.2 591 3/19/2019
1.0.1 581 3/19/2019
1.0.0 576 3/18/2019

Version 213 support.