{"id":18811747,"url":"https://github.com/logicmonitor/lm-data-sdk-go","last_synced_at":"2026-04-07T19:31:49.189Z","repository":{"id":37389567,"uuid":"495686279","full_name":"logicmonitor/lm-data-sdk-go","owner":"logicmonitor","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-04T06:30:54.000Z","size":304,"stargazers_count":1,"open_issues_count":5,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-02-12T07:07:40.499Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/logicmonitor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-24T05:48:42.000Z","updated_at":"2025-07-04T06:11:47.000Z","dependencies_parsed_at":"2023-12-08T11:26:02.899Z","dependency_job_id":"7ee5b05f-fbfc-4f8b-acf8-ca0c7842ea66","html_url":"https://github.com/logicmonitor/lm-data-sdk-go","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/logicmonitor/lm-data-sdk-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicmonitor%2Flm-data-sdk-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicmonitor%2Flm-data-sdk-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicmonitor%2Flm-data-sdk-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicmonitor%2Flm-data-sdk-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/logicmonitor","download_url":"https://codeload.github.com/logicmonitor/lm-data-sdk-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicmonitor%2Flm-data-sdk-go/sbom","scorecard":{"id":597294,"data":{"date":"2023-10-02","repo":{"name":"github.com/logicmonitor/lm-data-sdk-go","commit":"cda6da6f4fdac81dc0d36ae654b348604192db37"},"scorecard":{"version":"v4.10.2","commit":"376f465c111c39c6a5ad7408e8896cd790cb5219"},"score":6.3,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#binary-artifacts"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#branch-protection"}},{"name":"CI-Tests","score":10,"reason":"16 out of 16 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#ci-tests"}},{"name":"CII-Best-Practices","score":0,"reason":"no badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#cii-best-practices"}},{"name":"Code-Review","score":7,"reason":"12 out of last 17 changesets reviewed before merge -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#code-review"}},{"name":"Contributors","score":3,"reason":"1 different organizations found -- score normalized to 3","details":["Info: contributors work for logicmonitor"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#contributors"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#dangerous-workflow"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: Dependabot detected: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#dependency-update-tool"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":null,"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: License file found in expected location: LICENSE:1","Info: FSF or OSI recognized license: LICENSE:1"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#license"}},{"name":"Maintained","score":0,"reason":"0 commit(s) out of 30 and 0 issue activity out of 0 found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"no published package detected","details":["Warn: no GitHub publishing workflow detected"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info: GitHub-owned GitHubActions are pinned","Info: Third-party GitHubActions are pinned","Info: Dockerfile dependencies are pinned","Info: no insecure (not pinned by hash) dependency downloads found in Dockerfiles","Info: no insecure (not pinned by hash) dependency downloads found in shell scripts"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: all commits (29) are checked with a SAST tool","Info: SAST tool detected: CodeQL"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#sast"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":null,"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":["Warn: no GitHub releases found"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#signed-releases"}},{"name":"Token-Permissions","score":10,"reason":"tokens are read-only in GitHub workflows","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:11","Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:18","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:19","Info: topLevel 'contents' permission set to 'read': .github/workflows/dependency-review.yml:11","Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:18"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#token-permissions"}},{"name":"Vulnerabilities","score":-1,"reason":"internal error: vulnerabilitiesClient.ListUnfixedVulnerabilities: osvscanner.DoScan: vulnerabilities found","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/376f465c111c39c6a5ad7408e8896cd790cb5219/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T23:27:24.508Z","repository_id":37389567,"created_at":"2025-08-20T23:27:24.509Z","updated_at":"2025-08-20T23:27:24.509Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31526665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T23:27:32.417Z","updated_at":"2026-04-07T19:31:49.172Z","avatar_url":"https://github.com/logicmonitor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LogicMonitor Go Data SDK\n\nLogicMonitor Go Data SDK is suitable for ingesting the metrics and logs into the LogicMonitor Platform.\n\n## Overview\nLogicMonitor's Push Metrics feature allows you to send metrics directly to the LogicMonitor platform via a dedicated API, removing the need to route the data through a LogicMonitor Collector. Once ingested, these metrics are presented alongside all other metrics gathered via LogicMonitor, providing a single pane of glass for metric monitoring and alerting.\n\nSimilarly, If a log integration isn’t available or you have custom logs that you want to analyze, you can send the logs directly to your LogicMonitor account via the logs ingestion API.\n\n## Getting Started\n\n### Installation\n\nTo use the LogicMonitor Go Data SDK in your Go module, you can simply run the following command:\n\n```bash\ngo get -u github.com/logicmonitor/lm-data-sdk-go\n```\n\n### Authentication\nWhile using LMv1 authentication set LOGICMONITOR_ACCESS_ID and LOGICMONITOR_ACCESS_KEY properties.\nIn case of BearerToken authentication set LOGICMONITOR_BEARER_TOKEN property. \nCompany's name or Account name must be passed to LOGICMONITOR_ACCOUNT property. \nAll properties can be set using environment variable.\n\n| Environment variable |\tDescription |\n| -------------------- |:--------------:|\n|   LOGICMONITOR_ACCOUNT         |\tAccount name (Company Name) is your organization name |\n|   LOGICMONITOR_ACCESS_ID       |\tAccess id while using LMv1 authentication.|\n|   LOGICMONITOR_ACCESS_KEY      |\tAccess key while using LMv1 authentication.|\n|   LOGICMONITOR_BEARER_TOKEN    |\tBearerToken while using Bearer authentication.|\n\n## Usage\n\n### Metrics Ingestion\n\nThis is how you can initialise metrics client:\n\n```go\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/logicmonitor/lm-data-sdk-go/api/metrics\"\n)\n\nfunc main() {\n\toptions := []metrics.Option{\n\t\tmetrics.WithMetricBatchingInterval(3 * time.Second),\n        ...\n\t}\n\n\tlmMetric, err := metrics.NewLMMetricIngest(context.Background(), options...)\n\tif err != nil {\n\t\tfmt.Fprintf(os.Stderr, \"Error when initializing metric client: %v\\n\", err)\n\t\treturn\n\t}\n    ...\n}\n```\n\nHere is the complete [example](https://github.com/logicmonitor/lm-data-sdk-go/blob/main/example/metrics/metricsingestion.go) for metrics ingestion.\n\n\n#### Options\n\nFollowing options can be used to create the metrics api client.\n\n|   Option  |\tDescription |\n| -------------------- |:----------------------------------:|\n| `WithMetricBatchingInterval(batchinterval time.Duration)`  | Sets time interval to wait before performing next batching of metrics. Default value is `10s`. |\n| `WithMetricBatchingDisabled()` | Disables batching of metrics. Default value is `Enabled`. |\n| `WithGzipCompression(gzip bool)` | Enables / disables gzip compression of metric payload. Default value is `Enabled`. |\n| `WithRateLimit(requestCount int)` | Sets limit on the number of requests to metrics API per minute. Default value is `100`. |\n| `WithHTTPClient(client *http.Client)` | Sets custom HTTP Client. Default http client is configured with timeout of `5s`.|\n| `WithEndpoint(endpoint string)` | Sets endpoint to send the metrics to. Default value is `https://${LOGICMONITOR_ACCOUNT}.logicmonitor.com/rest/`.|\n| `WithAuthentication(authParams utils.AuthParams)`  | Sets authentication parameters. |\n\n### Logs Ingestion\n\nThis is how you can initialise logs client:\n\n```go\n  import (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/logicmonitor/lm-data-sdk-go/api/logs\"\n)\n\nfunc main() {\n\toptions := []logs.Option{\n\t\tlogs.WithLogBatchingDisabled(),\n        ...\n\t}\n\n\tlmLog, err := logs.NewLMLogIngest(context.Background(), options...)\n\tif err != nil {\n\t\tfmt.Fprintf(os.Stderr, \"Error when initializing log client: %v\", err)\n\t\treturn\n\t}\n    ...\n}\n```\n\nHere is the complete [example](https://github.com/logicmonitor/lm-data-sdk-go/blob/main/example/logs/logsingestion.go) for logs ingestion.\n\n\n#### Options\n\nFollowing options can be used to create the logs api client.\n\n\n|   Option  |\tDescription |\n| -------------------- |:---------------------------------------------:| \n| `WithLogBatchingInterval(batchinterval time.Duration)`  | Sets time interval to wait before performing next batching of logs. Default value is `10s`. |\n| `WithLogBatchingDisabled()` | Disables batching of logs. Default value is `Enabled`. |\n| `WithGzipCompression(gzip bool)` | Enables / disables gzip compression of logs payload. Default value is `Enabled`. |\n| `WithRateLimit(requestCount int)` | Sets limit on the number of requests to logs API per minute. Default value is `100`. |\n| `WithHTTPClient(client *http.Client)` | Sets custom HTTP Client. Default http client is configured with timeout of `5s`.|\n| `WithEndpoint(endpoint string)` | Sets endpoint to send the logs to. Default value is `https://${LOGICMONITOR_ACCOUNT}.logicmonitor.com/rest/`|\n| `WithResourceMappingOperation(op string)` | Sets resource mapping operation. Valid operations are `AND` \u0026 `OR`. |\n| `WithUserAgent(userAgent string)`         | Sets user agent. |\n| `WithAuthentication(authParams utils.AuthParams)`         | Sets authentication parameters. |\n\n\n## License\n\nCopyright, 2023, LogicMonitor, Inc.\n\nThis Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogicmonitor%2Flm-data-sdk-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogicmonitor%2Flm-data-sdk-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogicmonitor%2Flm-data-sdk-go/lists"}