LogicMonitor.Datamart 3.212.1

There is a newer version of this package available.
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                
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.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LogicMonitor.Datamart --version 3.212.1                
#r "nuget: LogicMonitor.Datamart, 3.212.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.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

  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 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. 
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 102 11/13/2024
3.212.1 66 11/12/2024
3.211.41 118 11/12/2024
3.211.36 157 10/22/2024
3.211.9 85 10/21/2024
3.211.8 129 10/9/2024
3.211.6 104 10/8/2024
3.211.5 103 10/1/2024
3.211.2 119 9/29/2024
3.209.2 185 9/3/2024
3.209.1 109 8/31/2024
3.204.25 111 8/27/2024
3.204.24 133 8/16/2024
3.204.22 83 8/5/2024
3.204.19 81 7/25/2024
3.204.18 137 7/4/2024
3.204.17 83 7/4/2024
3.204.13 100 6/24/2024
3.204.12 112 6/11/2024
3.204.11 86 6/11/2024
3.204.10 109 6/7/2024
3.204.5 92 6/3/2024
3.204.3 69 6/3/2024
3.204.2 75 6/3/2024
3.204.1 86 5/30/2024
3.203.10 91 5/30/2024
3.203.9 117 5/26/2024
3.203.8 107 5/17/2024
3.203.7 88 5/13/2024
3.203.4 95 5/10/2024
3.203.3 81 5/10/2024
3.203.2 72 5/10/2024
3.203.1 92 5/9/2024
3.201.22 91 5/8/2024
3.201.21 144 4/25/2024
3.201.19 124 4/25/2024
3.201.18 113 4/21/2024
3.201.17 129 4/16/2024
3.201.16 121 4/16/2024
3.201.14 115 4/16/2024
3.201.12 127 4/4/2024
3.201.7 133 3/26/2024
3.201.5 108 3/25/2024
3.201.4 116 3/20/2024
3.201.3 122 3/20/2024
3.201.2 117 3/16/2024
3.201.1 114 3/8/2024
3.198.22 132 3/1/2024
3.198.20 97 2/14/2024
3.198.19 87 2/13/2024
3.198.16 70 2/12/2024
3.198.8 80 2/7/2024
3.198.5 72 2/5/2024
3.198.4 69 2/5/2024
3.198.3 73 2/2/2024
3.198.2 78 1/30/2024
3.198.1 80 1/23/2024
3.197.9 86 1/17/2024
3.197.3 84 1/10/2024
3.197.1 84 1/2/2024
3.196.1 123 12/8/2023
3.191.15 118 11/15/2023
3.191.8 174 10/27/2023
3.191.7 129 10/23/2023
3.191.6 123 10/23/2023
3.191.4 238 8/29/2023
3.191.2 134 8/25/2023
3.191.1 146 8/23/2023
3.183.70 144 8/7/2023
3.183.67 133 8/3/2023
3.183.66 141 8/3/2023
3.183.65 130 8/3/2023
3.183.64 108 8/2/2023
3.183.62 168 7/21/2023
3.183.58 163 7/17/2023
3.183.56 157 7/17/2023
3.183.55 160 7/14/2023
3.183.52 158 7/11/2023
3.183.50 171 7/4/2023
3.183.49 153 7/4/2023
3.183.48 152 7/4/2023
3.183.47 185 6/8/2023
3.183.46 156 6/7/2023
3.183.43 159 5/26/2023
3.183.37 158 5/22/2023
3.183.35 160 5/16/2023
3.183.33 170 5/10/2023
3.183.32 173 5/10/2023
3.183.29 166 5/9/2023
3.183.28 184 5/1/2023
3.183.23 181 5/1/2023
3.183.20 186 4/26/2023
3.183.18 201 4/24/2023
3.183.16 193 4/20/2023
3.183.15 196 4/18/2023
3.183.13 190 4/18/2023
3.183.12 186 4/18/2023
3.183.9 296 3/24/2023
3.183.7 234 3/20/2023
3.183.6 236 3/20/2023
3.183.5 224 3/24/2023
3.183.4 254 3/20/2023
3.183.2 240 3/15/2023
3.183.1 240 3/13/2023
3.182.6 253 3/5/2023
3.182.4 257 3/3/2023
3.182.3 259 3/2/2023
3.182.2 260 3/1/2023
3.182.1 271 2/21/2023
3.0.42 288 2/5/2023
3.0.41 282 2/5/2023
3.0.40 263 2/5/2023
3.0.39 285 2/5/2023
3.0.38 292 2/5/2023
3.0.37 288 2/5/2023
3.0.35 322 1/9/2023
3.0.33 302 1/9/2023
3.0.31 427 10/31/2022
3.0.29 393 9/30/2022
3.0.11 567 3/13/2022
3.0.9 455 2/14/2022
3.0.6 487 1/31/2022
3.0.5 444 1/20/2022
3.0.2 286 1/7/2022
2.1.42 927 12/3/2021
2.1.40 6,723 11/23/2021
2.1.39 5,929 11/23/2021
2.1.38 5,419 11/23/2021
2.1.37 5,103 11/23/2021
2.1.36 650 6/22/2021
2.1.35 442 6/22/2021
2.1.34 445 6/22/2021
2.1.33 417 6/22/2021
2.1.31 446 6/21/2021
2.1.30 458 6/20/2021
2.1.28 518 6/18/2021
2.1.27 485 6/18/2021
2.1.18 488 3/26/2021
2.1.17 482 3/24/2021
2.1.16 430 2/12/2021
2.1.15 439 2/11/2021
2.1.14 565 12/1/2020
2.1.12 566 11/11/2020
2.1.11 582 10/13/2020
2.1.9 612 6/18/2020
2.1.8 516 5/29/2020
2.1.6 529 5/12/2020
2.1.5 563 5/8/2020
2.1.2 547 4/3/2020
2.0.70 499 3/26/2020
2.0.69 494 3/19/2020
2.0.67 507 3/19/2020
2.0.63 579 1/3/2020
2.0.61 585 12/6/2019
2.0.57 566 11/14/2019
2.0.53 546 11/13/2019
2.0.52 547 11/13/2019
2.0.51 526 11/13/2019
2.0.50 522 11/12/2019
2.0.49 522 11/12/2019
2.0.47 557 11/11/2019
2.0.46 529 11/11/2019
2.0.45 568 11/11/2019
2.0.44 532 11/11/2019
2.0.43 540 11/11/2019
2.0.42 531 11/11/2019
2.0.40-beta 359 11/8/2019
2.0.39-beta 339 11/8/2019
2.0.38-beta 338 11/8/2019
2.0.37-beta 352 11/8/2019
2.0.36-beta 362 11/8/2019
2.0.35-beta 352 11/8/2019
2.0.28-beta 365 10/29/2019
2.0.25-beta 332 10/29/2019
2.0.19-beta 356 10/27/2019
2.0.18-beta 362 10/27/2019
2.0.17-beta 366 10/27/2019
2.0.8-beta 341 10/24/2019
2.0.7-beta 349 10/24/2019
2.0.0-beta 348 11/11/2019
1.2.3 607 10/14/2019
1.2.2 626 8/30/2019
1.2.1 556 8/27/2019
1.2.0 617 4/25/2019
1.1.5 598 4/4/2019
1.1.4 554 4/4/2019
1.1.3 578 4/4/2019
1.1.2 575 4/4/2019
1.1.1 569 4/4/2019
1.1.0 572 4/4/2019
1.0.20 564 4/2/2019
1.0.19 577 4/2/2019
1.0.18 597 4/1/2019
1.0.17 603 4/1/2019
1.0.16 587 4/1/2019
1.0.15 586 4/1/2019
1.0.14 584 4/1/2019
1.0.13 569 4/1/2019
1.0.12 608 4/1/2019
1.0.11 597 3/26/2019
1.0.10 595 3/26/2019
1.0.9 578 3/26/2019
1.0.8 573 3/26/2019
1.0.7 582 3/26/2019
1.0.6 579 3/20/2019
1.0.5 586 3/20/2019
1.0.4 566 3/19/2019
1.0.3 568 3/19/2019
1.0.2 584 3/19/2019
1.0.1 574 3/19/2019
1.0.0 568 3/18/2019

Added audit events.