Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
Improve readme and update test configs
Browse files Browse the repository at this point in the history
  • Loading branch information
sxwei123 committed Jan 12, 2021
1 parent d043b3a commit b92c0c8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@

![Test status](https://github.com/sxwei123/azure-log-analytics-data-collector-client/workflows/Test/badge.svg?branch=master)

A node.js wrapper for [Azure Monitor HTTP Data Collector API](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/data-collector-api).
Node.JS wrapper for [Azure Monitor HTTP Data Collector API](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/data-collector-api).

## Installation

```sh
npm install azure-log-analytics-data-collector-client
```

Or with yarn:

```sh
yarn add azure-log-analytics-data-collector-client
```

Expand Down Expand Up @@ -56,6 +62,16 @@ client

To get your `WORKSPACE_ID` and `PRIMARY_KEY_OR_SECONDARY_KEY`, in your workspace go to `advanced settings` -> `connected resources` -> `Agents management`.

To query your logs, go to the `Logs` tab of your workspace and use `MyLogs_CL` as query table name. Sample query:

```
MyLogs_CL
| where TimeGenerated > ago(24h)
| limit 10
```

Please note that only alphanumeric and underscore can be used as table name. the `-` in the table name will be replaced with `_`.

## Response Object

| Property | Optional | Description |
Expand All @@ -64,3 +80,7 @@ To get your `WORKSPACE_ID` and `PRIMARY_KEY_OR_SECONDARY_KEY`, in your workspace
| status | no | HTTP response status |
| errorCode | yes | [Error code](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/data-collector-api#return-codes) from server |
| errorMsg | yes | Error message from server |

## License

MIT
4 changes: 2 additions & 2 deletions jestconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"transform": {
"^.+\\.(t|j)sx?$": "ts-jest"
"^.+\\.tsx?$": "ts-jest"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"testRegex": "(/test/.*|(\\.|/)spec)\\.|tsx$",
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"Azure Monitor",
"Log Analytics",
"Data Collector API",
"NodeJS"
"NodeJS Wrapper"
],
"publishConfig": {
"access": "public"
Expand Down
File renamed without changes.

0 comments on commit b92c0c8

Please sign in to comment.