LogicMonitor.Datamart 3.212.3

dotnet add package LogicMonitor.Datamart --version 3.212.3                
NuGet\Install-Package LogicMonitor.Datamart -Version 3.212.3                
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.212.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LogicMonitor.Datamart --version 3.212.3                
#r "nuget: LogicMonitor.Datamart, 3.212.3"                
#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.212.3

// Install LogicMonitor.Datamart as a Cake Tool
#tool nuget:?package=LogicMonitor.Datamart&version=3.212.3                

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.212.3 117 11/13/2024
3.212.1 75 11/12/2024
3.211.41 140 11/12/2024
3.211.36 160 10/22/2024
3.211.9 88 10/21/2024
3.211.8 132 10/9/2024
3.211.6 108 10/8/2024
3.211.5 106 10/1/2024
3.211.2 120 9/29/2024
3.209.2 186 9/3/2024
3.209.1 113 8/31/2024
3.204.25 112 8/27/2024
3.204.24 134 8/16/2024
3.204.22 84 8/5/2024
3.204.19 82 7/25/2024
3.204.18 138 7/4/2024
3.204.17 84 7/4/2024
3.204.13 101 6/24/2024
3.204.12 113 6/11/2024
3.204.11 87 6/11/2024
3.204.10 110 6/7/2024
3.204.5 93 6/3/2024
3.204.3 70 6/3/2024
3.204.2 76 6/3/2024
3.204.1 87 5/30/2024
3.203.10 92 5/30/2024
3.203.9 118 5/26/2024
3.203.8 108 5/17/2024
3.203.7 89 5/13/2024
3.203.4 96 5/10/2024
3.203.3 82 5/10/2024
3.203.2 73 5/10/2024
3.203.1 93 5/9/2024
3.201.22 92 5/8/2024
3.201.21 145 4/25/2024
3.201.19 125 4/25/2024
3.201.18 114 4/21/2024
3.201.17 130 4/16/2024
3.201.16 122 4/16/2024
3.201.14 116 4/16/2024
3.201.12 128 4/4/2024
3.201.7 134 3/26/2024
3.201.5 111 3/25/2024
3.201.4 117 3/20/2024
3.201.3 123 3/20/2024
3.201.2 118 3/16/2024
3.201.1 115 3/8/2024
3.198.22 133 3/1/2024
3.198.20 98 2/14/2024
3.198.19 90 2/13/2024
3.198.16 71 2/12/2024
3.198.8 81 2/7/2024
3.198.5 73 2/5/2024
3.198.4 70 2/5/2024
3.198.3 74 2/2/2024
3.198.2 79 1/30/2024
3.198.1 81 1/23/2024
3.197.9 87 1/17/2024
3.197.3 85 1/10/2024
3.197.1 85 1/2/2024
3.196.1 124 12/8/2023
3.191.15 119 11/15/2023
3.191.8 175 10/27/2023
3.191.7 130 10/23/2023
3.191.6 124 10/23/2023
3.191.4 239 8/29/2023
3.191.2 135 8/25/2023
3.191.1 147 8/23/2023
3.183.70 145 8/7/2023
3.183.67 134 8/3/2023
3.183.66 142 8/3/2023
3.183.65 131 8/3/2023
3.183.64 111 8/2/2023
3.183.62 169 7/21/2023
3.183.58 164 7/17/2023
3.183.56 158 7/17/2023
3.183.55 161 7/14/2023
3.183.52 159 7/11/2023
3.183.50 172 7/4/2023
3.183.49 154 7/4/2023
3.183.48 153 7/4/2023
3.183.47 186 6/8/2023
3.183.46 157 6/7/2023
3.183.43 160 5/26/2023
3.183.37 159 5/22/2023
3.183.35 161 5/16/2023
3.183.33 171 5/10/2023
3.183.32 174 5/10/2023
3.183.29 167 5/9/2023
3.183.28 185 5/1/2023
3.183.23 182 5/1/2023
3.183.20 187 4/26/2023
3.183.18 202 4/24/2023
3.183.16 194 4/20/2023
3.183.15 197 4/18/2023
3.183.13 191 4/18/2023
3.183.12 187 4/18/2023
3.183.9 297 3/24/2023
3.183.7 235 3/20/2023
3.183.6 237 3/20/2023
3.183.5 225 3/24/2023
3.183.4 255 3/20/2023
3.183.2 241 3/15/2023
3.183.1 241 3/13/2023
3.182.6 254 3/5/2023
3.182.4 258 3/3/2023
3.182.3 260 3/2/2023
3.182.2 261 3/1/2023
3.182.1 272 2/21/2023
3.0.42 289 2/5/2023
3.0.41 283 2/5/2023
3.0.40 264 2/5/2023
3.0.39 286 2/5/2023
3.0.38 293 2/5/2023
3.0.37 289 2/5/2023
3.0.35 323 1/9/2023
3.0.33 303 1/9/2023
3.0.31 428 10/31/2022
3.0.29 394 9/30/2022
3.0.11 568 3/13/2022
3.0.9 456 2/14/2022
3.0.6 488 1/31/2022
3.0.5 445 1/20/2022
3.0.2 287 1/7/2022
2.1.42 928 12/3/2021
2.1.40 6,724 11/23/2021
2.1.39 5,930 11/23/2021
2.1.38 5,420 11/23/2021
2.1.37 5,104 11/23/2021
2.1.36 651 6/22/2021
2.1.35 443 6/22/2021
2.1.34 446 6/22/2021
2.1.33 418 6/22/2021
2.1.31 447 6/21/2021
2.1.30 459 6/20/2021
2.1.28 519 6/18/2021
2.1.27 486 6/18/2021
2.1.18 489 3/26/2021
2.1.17 483 3/24/2021
2.1.16 431 2/12/2021
2.1.15 440 2/11/2021
2.1.14 566 12/1/2020
2.1.12 567 11/11/2020
2.1.11 583 10/13/2020
2.1.9 613 6/18/2020
2.1.8 517 5/29/2020
2.1.6 530 5/12/2020
2.1.5 564 5/8/2020
2.1.2 548 4/3/2020
2.0.70 500 3/26/2020
2.0.69 495 3/19/2020
2.0.67 508 3/19/2020
2.0.63 580 1/3/2020
2.0.61 586 12/6/2019
2.0.57 567 11/14/2019
2.0.53 547 11/13/2019
2.0.52 548 11/13/2019
2.0.51 527 11/13/2019
2.0.50 523 11/12/2019
2.0.49 523 11/12/2019
2.0.47 558 11/11/2019
2.0.46 530 11/11/2019
2.0.45 569 11/11/2019
2.0.44 533 11/11/2019
2.0.43 541 11/11/2019
2.0.42 532 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 608 10/14/2019
1.2.2 627 8/30/2019
1.2.1 557 8/27/2019
1.2.0 618 4/25/2019
1.1.5 599 4/4/2019
1.1.4 555 4/4/2019
1.1.3 579 4/4/2019
1.1.2 576 4/4/2019
1.1.1 570 4/4/2019
1.1.0 573 4/4/2019
1.0.20 565 4/2/2019
1.0.19 578 4/2/2019
1.0.18 598 4/1/2019
1.0.17 604 4/1/2019
1.0.16 588 4/1/2019
1.0.15 587 4/1/2019
1.0.14 585 4/1/2019
1.0.13 570 4/1/2019
1.0.12 609 4/1/2019
1.0.11 598 3/26/2019
1.0.10 596 3/26/2019
1.0.9 579 3/26/2019
1.0.8 574 3/26/2019
1.0.7 585 3/26/2019
1.0.6 580 3/20/2019
1.0.5 587 3/20/2019
1.0.4 567 3/19/2019
1.0.3 569 3/19/2019
1.0.2 585 3/19/2019
1.0.1 575 3/19/2019
1.0.0 569 3/18/2019

Added audit events.