[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FD61D2GXTV1DJ8B6AV10DT":3,"skill-same:01M6FD61D2GXTV1DJ8B6AV10DT":51},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":24,"linkOnly":25,"markdownContent":26,"markdownBody":26,"frontMatter":27,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M6FD61D2GXTV1DJ8B6AV10DT","azure-monitor-ingestion-java",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fmicrosoft\u002Fskills\u002Fazure-monitor-ingestion-java\u002FSKILL.md",[],[18,19,20,21,22,23],"azure","azure monitor ingestion java","monitor","java","ingestion","azure monitor","2026-11-10 10:12:30",false,"# Azure Monitor Ingestion SDK for Java\n\nClient library for sending custom logs to Azure Monitor using the Logs Ingestion API via Data Collection Rules.\n\n## Installation\n\n```xml\n\u003Cdependency>\n    \u003CgroupId>com.azure\u003C\u002FgroupId>\n    \u003CartifactId>azure-monitor-ingestion\u003C\u002FartifactId>\n    \u003Cversion>1.2.11\u003C\u002Fversion>\n\u003C\u002Fdependency>\n```\n\nOr use Azure SDK BOM:\n\n```xml\n\u003CdependencyManagement>\n    \u003Cdependencies>\n        \u003Cdependency>\n            \u003CgroupId>com.azure\u003C\u002FgroupId>\n            \u003CartifactId>azure-sdk-bom\u003C\u002FartifactId>\n            \u003Cversion>{bom_version}\u003C\u002Fversion>\n            \u003Ctype>pom\u003C\u002Ftype>\n            \u003Cscope>import\u003C\u002Fscope>\n        \u003C\u002Fdependency>\n    \u003C\u002Fdependencies>\n\u003C\u002FdependencyManagement>\n\n\u003Cdependencies>\n    \u003Cdependency>\n        \u003CgroupId>com.azure\u003C\u002FgroupId>\n        \u003CartifactId>azure-monitor-ingestion\u003C\u002FartifactId>\n    \u003C\u002Fdependency>\n\u003C\u002Fdependencies>\n```\n\n## Prerequisites\n\n- Data Collection Endpoint (DCE)\n- Data Collection Rule (DCR)\n- Log Analytics workspace\n- Target table (custom or built-in: CommonSecurityLog, SecurityEvents, Syslog, WindowsEvents)\n\n## Environment Variables\n\n```bash\nDATA_COLLECTION_ENDPOINT=https:\u002F\u002F\u003Cdce-name>.\u003Cregion>.ingest.monitor.azure.com\nDATA_COLLECTION_RULE_ID=dcr-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nSTREAM_NAME=Custom-MyTable_CL\n```\n\n## Client Creation\n\n### Synchronous Client\n\n```java\nimport com.azure.identity.DefaultAzureCredential;\nimport com.azure.identity.DefaultAzureCredentialBuilder;\nimport com.azure.monitor.ingestion.LogsIngestionClient;\nimport com.azure.monitor.ingestion.LogsIngestionClientBuilder;\n\nDefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build();\n\nLogsIngestionClient client = new LogsIngestionClientBuilder()\n    .endpoint(\"\u003Cdata-collection-endpoint>\")\n    .credential(credential)\n    .buildClient();\n```\n\n### Asynchronous Client\n\n```java\nimport com.azure.monitor.ingestion.LogsIngestionAsyncClient;\n\nLogsIngestionAsyncClient asyncClient = new LogsIngestionClientBuilder()\n    .endpoint(\"\u003Cdata-collection-endpoint>\")\n    .credential(new DefaultAzureCredentialBuilder().build())\n    .buildAsyncClient();\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Data Collection Endpoint (DCE) | Ingestion endpoint URL for your region |\n| Data Collection Rule (DCR) | Defines data transformation and routing to tables |\n| Stream Name | Target stream in the DCR (e.g., `Custom-MyTable_CL`) |\n| Log Analytics Workspace | Destination for ingested logs |\n\n## Core Operations\n\n### Upload Custom Logs\n\n```java\nimport java.util.List;\nimport java.util.ArrayList;\n\nList\u003CObject> logs = new ArrayList\u003C>();\nlogs.add(new MyLogEntry(\"2024-01-15T10:30:00Z\", \"INFO\", \"Application started\"));\nlogs.add(new MyLogEntry(\"2024-01-15T10:30:05Z\", \"DEBUG\", \"Processing request\"));\n\nclient.upload(\"\u003Cdata-collection-rule-id>\", \"\u003Cstream-name>\", logs);\nSystem.out.println(\"Logs uploaded successfully\");\n```\n\n### Upload with Concurrency\n\nFor large log collections, enable concurrent uploads:\n\n```java\nimport com.azure.monitor.ingestion.models.LogsUploadOptions;\nimport com.azure.core.util.Context;\n\nList\u003CObject> logs = getLargeLogs(); \u002F\u002F Large collection\n\nLogsUploadOptions options = new LogsUploadOptions()\n    .setMaxConcurrency(3);\n\nclient.upload(\"\u003Cdata-collection-rule-id>\", \"\u003Cstream-name>\", logs, options, Context.NONE);\n```\n\n### Upload with Error Handling\n\nHandle partial upload failures gracefully:\n\n```java\nLogsUploadOptions options = new LogsUploadOptions()\n    .setLogsUploadErrorConsumer(uploadError -> {\n        System.err.println(\"Upload error: \" + uploadError.getResponseException().getMessage());\n        System.err.println(\"Failed logs count: \" + uploadError.getFailedLogs().size());\n        \n        \u002F\u002F Option 1: Log and continue\n        \u002F\u002F Option 2: Throw to abort remaining uploads\n        \u002F\u002F throw uploadError.getResponseException();\n    });\n\nclient.upload(\"\u003Cdata-collection-rule-id>\", \"\u003Cstream-name>\", logs, options, Context.NONE);\n```\n\n### Async Upload with Reactor\n\n```java\nimport reactor.core.publisher.Mono;\n\nList\u003CObject> logs = getLogs();\n\nasyncClient.upload(\"\u003Cdata-collection-rule-id>\", \"\u003Cstream-name>\", logs)\n    .doOnSuccess(v -> System.out.println(\"Upload completed\"))\n    .doOnError(e -> System.err.println(\"Upload failed: \" + e.getMessage()))\n    .subscribe();\n```\n\n## Log Entry Model Example\n\n```java\npublic class MyLogEntry {\n    private String timeGenerated;\n    private String level;\n    private String message;\n    \n    public MyLogEntry(String timeGenerated, String level, String message) {\n        this.timeGenerated = timeGenerated;\n        this.level = level;\n        this.message = message;\n    }\n    \n    \u002F\u002F Getters required for JSON serialization\n    public String getTimeGenerated() { return timeGenerated; }\n    public String getLevel() { return level; }\n    public String getMessage() { return message; }\n}\n```\n\n## Error Handling\n\n```java\nimport com.azure.core.exception.HttpResponseException;\n\ntry {\n    client.upload(ruleId, streamName, logs);\n} catch (HttpResponseException e) {\n    System.err.println(\"HTTP Status: \" + e.getResponse().getStatusCode());\n    System.err.println(\"Error: \" + e.getMessage());\n    \n    if (e.getResponse().getStatusCode() == 403) {\n        System.err.println(\"Check DCR permissions and managed identity\");\n    } else if (e.getResponse().getStatusCode() == 404) {\n        System.err.println(\"Verify DCE endpoint and DCR ID\");\n    }\n}\n```\n\n## Best Practices\n\n1. **Batch logs** — Upload in batches rather than one at a time\n2. **Use concurrency** — Set `maxConcurrency` for large uploads\n3. **Handle partial failures** — Use error consumer to log failed entries\n4. **Match DCR schema** — Log entry fields must match DCR transformation expectations\n5. **Include TimeGenerated** — Most tables require a timestamp field\n6. **Reuse client** — Create once, reuse throughout application\n7. **Use async for high throughput** — `LogsIngestionAsyncClient` for reactive patterns\n\n## Querying Uploaded Logs\n\nUse [azure-monitor-query](..\u002Fquery\u002FSKILL.md) to query ingested logs:\n\n```java\n\u002F\u002F See azure-monitor-query skill for LogsQueryClient usage\nString query = \"MyTable_CL | where TimeGenerated > ago(1h) | limit 10\";\n```\n\n## Reference Links\n\n| Resource | URL |\n|----------|-----|\n| Maven Package | https:\u002F\u002Fcentral.sonatype.com\u002Fartifact\u002Fcom.azure\u002Fazure-monitor-ingestion |\n| GitHub | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-java\u002Ftree\u002Fmain\u002Fsdk\u002Fmonitor\u002Fazure-monitor-ingestion |\n| Product Docs | https:\u002F\u002Flearn.microsoft.com\u002Fazure\u002Fazure-monitor\u002Flogs\u002Flogs-ingestion-api-overview |\n| DCE Overview | https:\u002F\u002Flearn.microsoft.com\u002Fazure\u002Fazure-monitor\u002Fessentials\u002Fdata-collection-endpoint-overview |\n| DCR Overview | https:\u002F\u002Flearn.microsoft.com\u002Fazure\u002Fazure-monitor\u002Fessentials\u002Fdata-collection-rule-overview |\n| Troubleshooting | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-java\u002Fblob\u002Fmain\u002Fsdk\u002Fmonitor\u002Fazure-monitor-ingestion\u002FTROUBLESHOOTING.md |\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fmicrosoft\u002Fskills\u002Fazure-monitor-ingestion-java",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill azure-monitor-ingestion-java",{"tool":43,"command":44},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill azure-monitor-ingestion-java",{"tool":46,"command":47},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill azure-monitor-ingestion-java","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fmicrosoft\u002Fskills\u002Fazure-monitor-ingestion-java\u002FSKILL.md",true,[],[52,61,70,79,85,91],{"skillNo":53,"name":54,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":24},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[58,59,60],"model","model hierarchy","model hierarchy skill",{"skillNo":62,"name":63,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":24},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[67,68,69],"MCP","zoom","zoom mcp",{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":24},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[76,77,78,68],"sdk","zoom apps sdk","apps",{"skillNo":80,"name":81,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":24},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[81],{"skillNo":86,"name":87,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":24},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[87],{"skillNo":92,"name":93,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":24},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[93]]