opencode-skills-collection 4.0.68 → 4.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +266 -1
- package/bundled-skills/access-review/SKILL.md +394 -0
- package/bundled-skills/access-review/references/details.md +121 -0
- package/bundled-skills/agent-evals/SKILL.md +420 -0
- package/bundled-skills/agent-observability/SKILL.md +346 -0
- package/bundled-skills/agent-observability/references/details.md +786 -0
- package/bundled-skills/ai-agent-security/SKILL.md +393 -0
- package/bundled-skills/ai-agent-security/references/details.md +912 -0
- package/bundled-skills/ai-coding-agent-guardrails/SKILL.md +442 -0
- package/bundled-skills/ai-coding-agent-guardrails/references/details.md +753 -0
- package/bundled-skills/ai-inference-service-mesh/SKILL.md +449 -0
- package/bundled-skills/ai-pipeline-orchestration/SKILL.md +287 -0
- package/bundled-skills/ai-red-teaming/SKILL.md +409 -0
- package/bundled-skills/ai-security-hardening/SKILL.md +343 -0
- package/bundled-skills/ai-sre-incident-response/SKILL.md +336 -0
- package/bundled-skills/alerting-oncall/SKILL.md +458 -0
- package/bundled-skills/alerting-oncall/references/details.md +84 -0
- package/bundled-skills/apk-redteam-pipeline/SKILL.md +446 -0
- package/bundled-skills/argocd-gitops/SKILL.md +469 -0
- package/bundled-skills/arm-templates/SKILL.md +438 -0
- package/bundled-skills/arm-templates/references/details.md +64 -0
- package/bundled-skills/asset-inventory/SKILL.md +412 -0
- package/bundled-skills/asset-inventory/references/details.md +127 -0
- package/bundled-skills/audit-logging/SKILL.md +476 -0
- package/bundled-skills/aws-cloudtrail/SKILL.md +486 -0
- package/bundled-skills/aws-cost-optimization/SKILL.md +331 -0
- package/bundled-skills/aws-ec2/SKILL.md +426 -0
- package/bundled-skills/aws-ecs-fargate/SKILL.md +388 -0
- package/bundled-skills/aws-iam/SKILL.md +463 -0
- package/bundled-skills/aws-lambda/SKILL.md +428 -0
- package/bundled-skills/aws-rds/SKILL.md +380 -0
- package/bundled-skills/aws-s3/SKILL.md +434 -0
- package/bundled-skills/aws-secrets-manager/SKILL.md +486 -0
- package/bundled-skills/aws-vpc/SKILL.md +436 -0
- package/bundled-skills/azure-ai-document-intelligence-ts/SKILL.md +1 -1
- package/bundled-skills/azure-aks/SKILL.md +423 -0
- package/bundled-skills/azure-devops/SKILL.md +457 -0
- package/bundled-skills/azure-functions-devsec/SKILL.md +436 -0
- package/bundled-skills/azure-keyvault/SKILL.md +455 -0
- package/bundled-skills/azure-keyvault/references/details.md +83 -0
- package/bundled-skills/azure-monitor-audit/SKILL.md +379 -0
- package/bundled-skills/azure-networking/SKILL.md +448 -0
- package/bundled-skills/azure-networking/references/details.md +135 -0
- package/bundled-skills/azure-sql/SKILL.md +413 -0
- package/bundled-skills/azure-sql/references/details.md +113 -0
- package/bundled-skills/azure-vms/SKILL.md +402 -0
- package/bundled-skills/azure-vms/references/details.md +134 -0
- package/bundled-skills/backup-recovery/SKILL.md +388 -0
- package/bundled-skills/bb-methodology/SKILL.md +451 -0
- package/bundled-skills/bb-methodology/references/details.md +120 -0
- package/bundled-skills/block-storage/SKILL.md +371 -0
- package/bundled-skills/blue-green-deploy/SKILL.md +453 -0
- package/bundled-skills/blue-green-deploy/references/details.md +90 -0
- package/bundled-skills/bug-bounty/SKILL.md +447 -0
- package/bundled-skills/bug-bounty/references/details.md +1316 -0
- package/bundled-skills/bugcrowd-reporting/SKILL.md +351 -0
- package/bundled-skills/business-continuity/SKILL.md +463 -0
- package/bundled-skills/career-ops/SKILL.md +186 -0
- package/bundled-skills/cdn-setup/SKILL.md +374 -0
- package/bundled-skills/change-management/SKILL.md +438 -0
- package/bundled-skills/change-management/references/details.md +105 -0
- package/bundled-skills/circleci/SKILL.md +475 -0
- package/bundled-skills/cis-benchmarks/SKILL.md +150 -0
- package/bundled-skills/cloudflare-pages/SKILL.md +318 -0
- package/bundled-skills/cloudflare-r2/SKILL.md +353 -0
- package/bundled-skills/cloudflare-workers/SKILL.md +415 -0
- package/bundled-skills/cloudflare-zero-trust/SKILL.md +361 -0
- package/bundled-skills/cloudformation/SKILL.md +461 -0
- package/bundled-skills/constraint-driven-development/SKILL.md +335 -0
- package/bundled-skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/bundled-skills/container-hardening/SKILL.md +126 -0
- package/bundled-skills/container-registries/SKILL.md +435 -0
- package/bundled-skills/container-scanning/SKILL.md +416 -0
- package/bundled-skills/convex-backend/SKILL.md +338 -0
- package/bundled-skills/dast-scanning/SKILL.md +437 -0
- package/bundled-skills/database-backups/SKILL.md +425 -0
- package/bundled-skills/datadog/SKILL.md +487 -0
- package/bundled-skills/dependency-scanning/SKILL.md +457 -0
- package/bundled-skills/devcontainers-nix/SKILL.md +416 -0
- package/bundled-skills/disaster-recovery/SKILL.md +374 -0
- package/bundled-skills/disaster-recovery/references/details.md +219 -0
- package/bundled-skills/dns-management/SKILL.md +375 -0
- package/bundled-skills/docker-compose/SKILL.md +482 -0
- package/bundled-skills/docker-management/SKILL.md +426 -0
- package/bundled-skills/ebpf-observability/SKILL.md +436 -0
- package/bundled-skills/ebpf-observability/references/details.md +542 -0
- package/bundled-skills/elk-stack/SKILL.md +487 -0
- package/bundled-skills/enterprise-vpn-attack/SKILL.md +395 -0
- package/bundled-skills/evidence-hygiene/SKILL.md +404 -0
- package/bundled-skills/feature-flags/SKILL.md +426 -0
- package/bundled-skills/feature-flags/references/details.md +86 -0
- package/bundled-skills/fedramp-compliance/SKILL.md +453 -0
- package/bundled-skills/firebase-app-platform/SKILL.md +381 -0
- package/bundled-skills/firewall-config/SKILL.md +479 -0
- package/bundled-skills/gcp-audit-logs/SKILL.md +452 -0
- package/bundled-skills/gcp-audit-logs/references/details.md +56 -0
- package/bundled-skills/gcp-cloud-functions/SKILL.md +284 -0
- package/bundled-skills/gcp-cloud-sql/SKILL.md +277 -0
- package/bundled-skills/gcp-compute/SKILL.md +319 -0
- package/bundled-skills/gcp-gke/SKILL.md +307 -0
- package/bundled-skills/gcp-networking/SKILL.md +293 -0
- package/bundled-skills/gcp-secret-manager/SKILL.md +421 -0
- package/bundled-skills/gcp-secret-manager/references/details.md +131 -0
- package/bundled-skills/gdpr-compliance/SKILL.md +451 -0
- package/bundled-skills/gdpr-compliance/references/details.md +145 -0
- package/bundled-skills/geo-audit/SKILL.md +368 -0
- package/bundled-skills/geo-brand-mentions/SKILL.md +68 -0
- package/bundled-skills/geo-brand-mentions/references/details.md +471 -0
- package/bundled-skills/geo-citability/SKILL.md +350 -0
- package/bundled-skills/geo-compare/SKILL.md +340 -0
- package/bundled-skills/geo-content/SKILL.md +383 -0
- package/bundled-skills/geo-crawlers/SKILL.md +408 -0
- package/bundled-skills/geo-llmstxt/SKILL.md +464 -0
- package/bundled-skills/geo-platform-optimizer/SKILL.md +314 -0
- package/bundled-skills/geo-proposal/SKILL.md +378 -0
- package/bundled-skills/geo-prospect/SKILL.md +225 -0
- package/bundled-skills/geo-report/SKILL.md +436 -0
- package/bundled-skills/geo-report-pdf/SKILL.md +157 -0
- package/bundled-skills/geo-schema/SKILL.md +408 -0
- package/bundled-skills/geo-technical/SKILL.md +78 -0
- package/bundled-skills/geo-technical/references/details.md +543 -0
- package/bundled-skills/git-workflow/SKILL.md +460 -0
- package/bundled-skills/github-actions/SKILL.md +368 -0
- package/bundled-skills/gitlab-ci/SKILL.md +340 -0
- package/bundled-skills/gpu-kubernetes-operations/SKILL.md +468 -0
- package/bundled-skills/gpu-server-management/SKILL.md +236 -0
- package/bundled-skills/hashicorp-vault/SKILL.md +408 -0
- package/bundled-skills/helm-charts/SKILL.md +469 -0
- package/bundled-skills/hipaa-compliance/SKILL.md +451 -0
- package/bundled-skills/hunt-aspnet/SKILL.md +321 -0
- package/bundled-skills/hunt-ato/SKILL.md +184 -0
- package/bundled-skills/hunt-auth-bypass/SKILL.md +426 -0
- package/bundled-skills/hunt-auth-bypass/references/details.md +80 -0
- package/bundled-skills/hunt-brute-force/SKILL.md +341 -0
- package/bundled-skills/hunt-business-logic/SKILL.md +281 -0
- package/bundled-skills/hunt-cache-poison/SKILL.md +382 -0
- package/bundled-skills/hunt-captcha-bypass/SKILL.md +136 -0
- package/bundled-skills/hunt-cicd/SKILL.md +311 -0
- package/bundled-skills/hunt-clickjacking/SKILL.md +110 -0
- package/bundled-skills/hunt-cors/SKILL.md +335 -0
- package/bundled-skills/hunt-dom/SKILL.md +323 -0
- package/bundled-skills/hunt-exceptional-conditions/SKILL.md +111 -0
- package/bundled-skills/hunt-file-upload/SKILL.md +202 -0
- package/bundled-skills/hunt-fintech-graphql/SKILL.md +289 -0
- package/bundled-skills/hunt-forgot-password/SKILL.md +114 -0
- package/bundled-skills/hunt-grpc/SKILL.md +317 -0
- package/bundled-skills/hunt-host-header/SKILL.md +309 -0
- package/bundled-skills/hunt-html-injection/SKILL.md +106 -0
- package/bundled-skills/hunt-http-smuggling/SKILL.md +129 -0
- package/bundled-skills/hunt-http-smuggling/references/phase2h-smuggling-cachepoison.md +177 -0
- package/bundled-skills/hunt-idor/SKILL.md +434 -0
- package/bundled-skills/hunt-jwt-crypto/SKILL.md +221 -0
- package/bundled-skills/hunt-k8s/SKILL.md +337 -0
- package/bundled-skills/hunt-laravel/SKILL.md +255 -0
- package/bundled-skills/hunt-ldap/SKILL.md +351 -0
- package/bundled-skills/hunt-lfi/SKILL.md +311 -0
- package/bundled-skills/hunt-llm-ai/SKILL.md +289 -0
- package/bundled-skills/hunt-mfa-bypass/SKILL.md +177 -0
- package/bundled-skills/hunt-misc/SKILL.md +378 -0
- package/bundled-skills/hunt-nextjs/SKILL.md +299 -0
- package/bundled-skills/hunt-nodejs/SKILL.md +263 -0
- package/bundled-skills/hunt-nosqli/SKILL.md +210 -0
- package/bundled-skills/hunt-ntlm-info/SKILL.md +314 -0
- package/bundled-skills/hunt-oauth/SKILL.md +459 -0
- package/bundled-skills/hunt-open-redirect/SKILL.md +223 -0
- package/bundled-skills/hunt-race-condition/SKILL.md +381 -0
- package/bundled-skills/hunt-race-condition/references/details.md +159 -0
- package/bundled-skills/hunt-rag-vector/SKILL.md +212 -0
- package/bundled-skills/hunt-rce/SKILL.md +444 -0
- package/bundled-skills/hunt-rce/references/details.md +110 -0
- package/bundled-skills/hunt-saml/SKILL.md +156 -0
- package/bundled-skills/hunt-session/SKILL.md +342 -0
- package/bundled-skills/hunt-shadow-api/SKILL.md +198 -0
- package/bundled-skills/hunt-source-leak/SKILL.md +345 -0
- package/bundled-skills/hunt-spa-api/SKILL.md +163 -0
- package/bundled-skills/hunt-springboot/SKILL.md +285 -0
- package/bundled-skills/hunt-sqli/SKILL.md +466 -0
- package/bundled-skills/hunt-ssrf/SKILL.md +396 -0
- package/bundled-skills/hunt-ssrf/references/details.md +179 -0
- package/bundled-skills/hunt-ssti/SKILL.md +163 -0
- package/bundled-skills/hunt-subdomain/SKILL.md +379 -0
- package/bundled-skills/hunt-tls-network/SKILL.md +399 -0
- package/bundled-skills/hunt-xxe/SKILL.md +466 -0
- package/bundled-skills/i-have-adhd/SKILL.md +170 -0
- package/bundled-skills/identity-access-management/SKILL.md +382 -0
- package/bundled-skills/identity-access-management/references/details.md +524 -0
- package/bundled-skills/incident-management/SKILL.md +484 -0
- package/bundled-skills/incident-response/SKILL.md +448 -0
- package/bundled-skills/incident-response/references/details.md +113 -0
- package/bundled-skills/interview-me/SKILL.md +248 -0
- package/bundled-skills/iso27001-compliance/SKILL.md +460 -0
- package/bundled-skills/jenkins/SKILL.md +462 -0
- package/bundled-skills/jev-use/SKILL.md +158 -0
- package/bundled-skills/kubernetes-hardening/SKILL.md +154 -0
- package/bundled-skills/kubernetes-ops/SKILL.md +449 -0
- package/bundled-skills/kubernetes-ops/references/details.md +108 -0
- package/bundled-skills/kustomize/SKILL.md +478 -0
- package/bundled-skills/linux-administration/SKILL.md +367 -0
- package/bundled-skills/linux-hardening/SKILL.md +154 -0
- package/bundled-skills/llm-app-security/SKILL.md +389 -0
- package/bundled-skills/llm-app-security/references/details.md +674 -0
- package/bundled-skills/llm-caching/SKILL.md +334 -0
- package/bundled-skills/llm-cost-optimization/SKILL.md +311 -0
- package/bundled-skills/llm-fine-tuning/SKILL.md +329 -0
- package/bundled-skills/llm-gateway/SKILL.md +282 -0
- package/bundled-skills/llm-inference-scaling/SKILL.md +286 -0
- package/bundled-skills/llmops-platform-engineering/SKILL.md +472 -0
- package/bundled-skills/load-balancing/SKILL.md +403 -0
- package/bundled-skills/loki-logging/SKILL.md +479 -0
- package/bundled-skills/m365-entra-attack/SKILL.md +423 -0
- package/bundled-skills/mac-mini-llm-lab/SKILL.md +350 -0
- package/bundled-skills/mcp-server-security/SKILL.md +356 -0
- package/bundled-skills/mcp-server-security/references/details.md +745 -0
- package/bundled-skills/mdm-device-management/SKILL.md +404 -0
- package/bundled-skills/mdm-device-management/references/details.md +410 -0
- package/bundled-skills/meme-coin-audit/SKILL.md +402 -0
- package/bundled-skills/mid-engagement-ir-detection/SKILL.md +377 -0
- package/bundled-skills/model-registry-governance/SKILL.md +452 -0
- package/bundled-skills/model-serving-kubernetes/SKILL.md +339 -0
- package/bundled-skills/model-supply-chain-security/SKILL.md +427 -0
- package/bundled-skills/mongodb/SKILL.md +436 -0
- package/bundled-skills/multi-tenant-llm-hosting/SKILL.md +435 -0
- package/bundled-skills/multi-tenant-llm-hosting/references/details.md +211 -0
- package/bundled-skills/mysql/SKILL.md +390 -0
- package/bundled-skills/new-relic/SKILL.md +472 -0
- package/bundled-skills/nfs-storage/SKILL.md +356 -0
- package/bundled-skills/object-storage/SKILL.md +378 -0
- package/bundled-skills/offensive-osint/SKILL.md +443 -0
- package/bundled-skills/okta-attack/SKILL.md +436 -0
- package/bundled-skills/ollama-stack/SKILL.md +379 -0
- package/bundled-skills/openclaw-deployment-hardening/SKILL.md +135 -0
- package/bundled-skills/openclaw-local-mac-mini/SKILL.md +426 -0
- package/bundled-skills/openclaw-local-mac-mini/references/details.md +221 -0
- package/bundled-skills/openclaw-security-hardening/SKILL.md +135 -0
- package/bundled-skills/openshift/SKILL.md +485 -0
- package/bundled-skills/opentelemetry/SKILL.md +438 -0
- package/bundled-skills/opentelemetry/references/details.md +78 -0
- package/bundled-skills/opentofu-migration/SKILL.md +349 -0
- package/bundled-skills/osint-methodology/SKILL.md +460 -0
- package/bundled-skills/osint-methodology/references/details.md +1350 -0
- package/bundled-skills/pci-dss-compliance/SKILL.md +446 -0
- package/bundled-skills/penetration-testing/SKILL.md +152 -0
- package/bundled-skills/performance-tuning/SKILL.md +381 -0
- package/bundled-skills/planetscale/SKILL.md +297 -0
- package/bundled-skills/platform-engineering/SKILL.md +348 -0
- package/bundled-skills/platform-engineering/references/details.md +944 -0
- package/bundled-skills/podman/SKILL.md +405 -0
- package/bundled-skills/policy-as-code/SKILL.md +434 -0
- package/bundled-skills/policy-as-code/references/details.md +204 -0
- package/bundled-skills/postgresql-devsec/SKILL.md +378 -0
- package/bundled-skills/prometheus-grafana/SKILL.md +469 -0
- package/bundled-skills/prompt-injection-defense/SKILL.md +483 -0
- package/bundled-skills/rag-infrastructure/SKILL.md +269 -0
- package/bundled-skills/rag-observability-evals/SKILL.md +444 -0
- package/bundled-skills/rag-observability-evals/references/details.md +92 -0
- package/bundled-skills/recon-scope-triage/SKILL.md +128 -0
- package/bundled-skills/redis/SKILL.md +421 -0
- package/bundled-skills/redteam-report-template/SKILL.md +370 -0
- package/bundled-skills/report-writing/SKILL.md +426 -0
- package/bundled-skills/report-writing/references/details.md +187 -0
- package/bundled-skills/reverse-proxy/SKILL.md +420 -0
- package/bundled-skills/runbook-creation/SKILL.md +438 -0
- package/bundled-skills/runbook-creation/references/details.md +71 -0
- package/bundled-skills/saas-security-posture/SKILL.md +415 -0
- package/bundled-skills/sast-scanning/SKILL.md +444 -0
- package/bundled-skills/sbom-supply-chain/SKILL.md +433 -0
- package/bundled-skills/security-arsenal/SKILL.md +446 -0
- package/bundled-skills/security-arsenal/references/details.md +540 -0
- package/bundled-skills/security-automation/SKILL.md +146 -0
- package/bundled-skills/semantic-versioning/SKILL.md +434 -0
- package/bundled-skills/semantic-versioning/references/details.md +83 -0
- package/bundled-skills/service-mesh/SKILL.md +422 -0
- package/bundled-skills/soc2-compliance/SKILL.md +409 -0
- package/bundled-skills/sops-encryption/SKILL.md +124 -0
- package/bundled-skills/sre-dashboards/SKILL.md +143 -0
- package/bundled-skills/ssh-configuration/SKILL.md +324 -0
- package/bundled-skills/ssl-tls-management/SKILL.md +428 -0
- package/bundled-skills/ssl-tls-management/references/details.md +99 -0
- package/bundled-skills/startup-it-troubleshooting/SKILL.md +415 -0
- package/bundled-skills/supply-chain-attack-recon/SKILL.md +453 -0
- package/bundled-skills/supply-chain-attack-recon/references/details.md +258 -0
- package/bundled-skills/systemd-services/SKILL.md +379 -0
- package/bundled-skills/terraform-aws/SKILL.md +125 -0
- package/bundled-skills/terraform-azure/SKILL.md +415 -0
- package/bundled-skills/terraform-azure/references/details.md +231 -0
- package/bundled-skills/terraform-gcp/SKILL.md +369 -0
- package/bundled-skills/threat-modeling/SKILL.md +487 -0
- package/bundled-skills/user-management/SKILL.md +383 -0
- package/bundled-skills/using-agent-skills/SKILL.md +220 -0
- package/bundled-skills/vector-database-ops/SKILL.md +300 -0
- package/bundled-skills/vendor-management/SKILL.md +439 -0
- package/bundled-skills/vendor-management/references/details.md +109 -0
- package/bundled-skills/vercel-deployments/SKILL.md +296 -0
- package/bundled-skills/vllm-server/SKILL.md +236 -0
- package/bundled-skills/vmware-vcenter-attack/SKILL.md +412 -0
- package/bundled-skills/vpn-setup/SKILL.md +452 -0
- package/bundled-skills/vulnerability-scanning/SKILL.md +448 -0
- package/bundled-skills/waf-setup/SKILL.md +354 -0
- package/bundled-skills/waf-setup/references/details.md +211 -0
- package/bundled-skills/web2-recon/SKILL.md +440 -0
- package/bundled-skills/web2-recon/references/details.md +319 -0
- package/bundled-skills/web3-audit/SKILL.md +445 -0
- package/bundled-skills/web3-audit/references/details.md +224 -0
- package/bundled-skills/windows-hardening/SKILL.md +454 -0
- package/bundled-skills/windows-hardening/references/details.md +204 -0
- package/bundled-skills/windows-server/SKILL.md +318 -0
- package/bundled-skills/zero-trust/SKILL.md +461 -0
- package/package.json +1 -1
- package/skills_index.json +6943 -323
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: elk-stack
|
|
3
|
+
description: Deploy and manage the ELK Stack (Elasticsearch, Logstash, Kibana) for
|
|
4
|
+
log aggregation and analysis.
|
|
5
|
+
category: devops
|
|
6
|
+
risk: critical
|
|
7
|
+
source: https://github.com/BagelHole/DevOps-Security-Agent-Skills
|
|
8
|
+
source_repo: BagelHole/DevOps-Security-Agent-Skills
|
|
9
|
+
source_type: community
|
|
10
|
+
date_added: '2026-09-20'
|
|
11
|
+
license: MIT
|
|
12
|
+
license_source: https://github.com/BagelHole/DevOps-Security-Agent-Skills/blob/main/LICENSE
|
|
13
|
+
compatibility: Requires the relevant platform CLIs (kubectl, helm, terraform, git,
|
|
14
|
+
CI runners) and authorized access to the target environment. Docs-only; helper scripts
|
|
15
|
+
and templates not bundled.
|
|
16
|
+
metadata:
|
|
17
|
+
author: devops-skills
|
|
18
|
+
version: '1.0'
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# ELK Stack
|
|
22
|
+
|
|
23
|
+
Centralize and analyze logs with Elasticsearch, Logstash, and Kibana.
|
|
24
|
+
|
|
25
|
+
## When to Use This Skill
|
|
26
|
+
|
|
27
|
+
Use this skill when:
|
|
28
|
+
- Centralizing logs from multiple sources
|
|
29
|
+
- Building log search and analytics platforms
|
|
30
|
+
- Creating log-based dashboards and alerts
|
|
31
|
+
- Implementing full-text search for logs
|
|
32
|
+
- Processing and transforming log data
|
|
33
|
+
|
|
34
|
+
## Prerequisites
|
|
35
|
+
|
|
36
|
+
- Docker or server infrastructure
|
|
37
|
+
- Sufficient disk space for log storage
|
|
38
|
+
- Network access from log sources
|
|
39
|
+
|
|
40
|
+
## Docker Deployment
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
# docker-compose.yml
|
|
44
|
+
version: '3.8'
|
|
45
|
+
|
|
46
|
+
services:
|
|
47
|
+
elasticsearch:
|
|
48
|
+
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0
|
|
49
|
+
environment:
|
|
50
|
+
- discovery.type=single-node
|
|
51
|
+
- xpack.security.enabled=false
|
|
52
|
+
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
|
|
53
|
+
ports:
|
|
54
|
+
- "9200:9200"
|
|
55
|
+
volumes:
|
|
56
|
+
- elasticsearch-data:/usr/share/elasticsearch/data
|
|
57
|
+
|
|
58
|
+
logstash:
|
|
59
|
+
image: docker.elastic.co/logstash/logstash:8.11.0
|
|
60
|
+
volumes:
|
|
61
|
+
- ./logstash/pipeline:/usr/share/logstash/pipeline
|
|
62
|
+
- ./logstash/config:/usr/share/logstash/config
|
|
63
|
+
ports:
|
|
64
|
+
- "5044:5044"
|
|
65
|
+
- "5000:5000"
|
|
66
|
+
depends_on:
|
|
67
|
+
- elasticsearch
|
|
68
|
+
|
|
69
|
+
kibana:
|
|
70
|
+
image: docker.elastic.co/kibana/kibana:8.11.0
|
|
71
|
+
ports:
|
|
72
|
+
- "5601:5601"
|
|
73
|
+
environment:
|
|
74
|
+
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
|
|
75
|
+
depends_on:
|
|
76
|
+
- elasticsearch
|
|
77
|
+
|
|
78
|
+
filebeat:
|
|
79
|
+
image: docker.elastic.co/beats/filebeat:8.11.0
|
|
80
|
+
user: root
|
|
81
|
+
volumes:
|
|
82
|
+
- ./filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
|
|
83
|
+
- /var/lib/docker/containers:/var/lib/docker/containers:ro
|
|
84
|
+
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
85
|
+
depends_on:
|
|
86
|
+
- logstash
|
|
87
|
+
|
|
88
|
+
volumes:
|
|
89
|
+
elasticsearch-data:
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Elasticsearch Configuration
|
|
93
|
+
|
|
94
|
+
### Index Templates
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
PUT _index_template/logs-template
|
|
98
|
+
{
|
|
99
|
+
"index_patterns": ["logs-*"],
|
|
100
|
+
"template": {
|
|
101
|
+
"settings": {
|
|
102
|
+
"number_of_shards": 1,
|
|
103
|
+
"number_of_replicas": 1,
|
|
104
|
+
"index.lifecycle.name": "logs-policy"
|
|
105
|
+
},
|
|
106
|
+
"mappings": {
|
|
107
|
+
"properties": {
|
|
108
|
+
"@timestamp": { "type": "date" },
|
|
109
|
+
"message": { "type": "text" },
|
|
110
|
+
"level": { "type": "keyword" },
|
|
111
|
+
"service": { "type": "keyword" },
|
|
112
|
+
"host": { "type": "keyword" },
|
|
113
|
+
"trace_id": { "type": "keyword" }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Index Lifecycle Management
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
PUT _ilm/policy/logs-policy
|
|
124
|
+
{
|
|
125
|
+
"policy": {
|
|
126
|
+
"phases": {
|
|
127
|
+
"hot": {
|
|
128
|
+
"min_age": "0ms",
|
|
129
|
+
"actions": {
|
|
130
|
+
"rollover": {
|
|
131
|
+
"max_size": "50GB",
|
|
132
|
+
"max_age": "1d"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"warm": {
|
|
137
|
+
"min_age": "7d",
|
|
138
|
+
"actions": {
|
|
139
|
+
"shrink": { "number_of_shards": 1 },
|
|
140
|
+
"forcemerge": { "max_num_segments": 1 }
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"cold": {
|
|
144
|
+
"min_age": "30d",
|
|
145
|
+
"actions": {
|
|
146
|
+
"freeze": {}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"delete": {
|
|
150
|
+
"min_age": "90d",
|
|
151
|
+
"actions": {
|
|
152
|
+
"delete": {}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Logstash Pipeline
|
|
161
|
+
|
|
162
|
+
### Basic Pipeline
|
|
163
|
+
|
|
164
|
+
```ruby
|
|
165
|
+
# logstash/pipeline/main.conf
|
|
166
|
+
input {
|
|
167
|
+
beats {
|
|
168
|
+
port => 5044
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
tcp {
|
|
172
|
+
port => 5000
|
|
173
|
+
codec => json_lines
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
filter {
|
|
178
|
+
# Parse JSON logs
|
|
179
|
+
if [message] =~ /^\{/ {
|
|
180
|
+
json {
|
|
181
|
+
source => "message"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
# Parse timestamp
|
|
186
|
+
date {
|
|
187
|
+
match => ["timestamp", "ISO8601", "yyyy-MM-dd HH:mm:ss"]
|
|
188
|
+
target => "@timestamp"
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
# Add environment tag
|
|
192
|
+
mutate {
|
|
193
|
+
add_field => { "environment" => "production" }
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
# Grok pattern for nginx logs
|
|
197
|
+
if [type] == "nginx" {
|
|
198
|
+
grok {
|
|
199
|
+
match => {
|
|
200
|
+
"message" => '%{IPORHOST:client_ip} - %{USER:user} \[%{HTTPDATE:timestamp}\] "%{WORD:method} %{URIPATHPARAM:request} HTTP/%{NUMBER:http_version}" %{NUMBER:status} %{NUMBER:bytes}'
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
output {
|
|
207
|
+
elasticsearch {
|
|
208
|
+
hosts => ["elasticsearch:9200"]
|
|
209
|
+
index => "logs-%{+YYYY.MM.dd}"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Advanced Filtering
|
|
215
|
+
|
|
216
|
+
```ruby
|
|
217
|
+
filter {
|
|
218
|
+
# Parse application logs
|
|
219
|
+
grok {
|
|
220
|
+
match => {
|
|
221
|
+
"message" => "%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:level} \[%{DATA:service}\] %{GREEDYDATA:log_message}"
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
# Extract trace ID from message
|
|
226
|
+
if [log_message] =~ /trace_id=/ {
|
|
227
|
+
grok {
|
|
228
|
+
match => { "log_message" => "trace_id=%{UUID:trace_id}" }
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
# GeoIP lookup
|
|
233
|
+
if [client_ip] {
|
|
234
|
+
geoip {
|
|
235
|
+
source => "client_ip"
|
|
236
|
+
target => "geoip"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
# Drop debug logs in production
|
|
241
|
+
if [level] == "DEBUG" and [environment] == "production" {
|
|
242
|
+
drop {}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
# Enrich with lookup
|
|
246
|
+
translate {
|
|
247
|
+
field => "status"
|
|
248
|
+
destination => "status_description"
|
|
249
|
+
dictionary => {
|
|
250
|
+
"200" => "OK"
|
|
251
|
+
"404" => "Not Found"
|
|
252
|
+
"500" => "Internal Server Error"
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## Filebeat Configuration
|
|
259
|
+
|
|
260
|
+
```yaml
|
|
261
|
+
# filebeat/filebeat.yml
|
|
262
|
+
filebeat.inputs:
|
|
263
|
+
- type: container
|
|
264
|
+
paths:
|
|
265
|
+
- '/var/lib/docker/containers/*/*.log'
|
|
266
|
+
processors:
|
|
267
|
+
- add_docker_metadata:
|
|
268
|
+
host: "unix:///var/run/docker.sock"
|
|
269
|
+
|
|
270
|
+
- type: log
|
|
271
|
+
enabled: true
|
|
272
|
+
paths:
|
|
273
|
+
- /var/log/nginx/*.log
|
|
274
|
+
tags: ["nginx"]
|
|
275
|
+
fields:
|
|
276
|
+
type: nginx
|
|
277
|
+
|
|
278
|
+
output.logstash:
|
|
279
|
+
hosts: ["logstash:5044"]
|
|
280
|
+
|
|
281
|
+
logging.level: info
|
|
282
|
+
logging.to_files: true
|
|
283
|
+
logging.files:
|
|
284
|
+
path: /var/log/filebeat
|
|
285
|
+
name: filebeat
|
|
286
|
+
keepfiles: 7
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
## Elasticsearch Queries
|
|
290
|
+
|
|
291
|
+
### Basic Queries
|
|
292
|
+
|
|
293
|
+
```json
|
|
294
|
+
// Search all logs
|
|
295
|
+
GET logs-*/_search
|
|
296
|
+
{
|
|
297
|
+
"query": {
|
|
298
|
+
"match_all": {}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// Search by keyword
|
|
303
|
+
GET logs-*/_search
|
|
304
|
+
{
|
|
305
|
+
"query": {
|
|
306
|
+
"match": {
|
|
307
|
+
"message": "error"
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// Filter by field
|
|
313
|
+
GET logs-*/_search
|
|
314
|
+
{
|
|
315
|
+
"query": {
|
|
316
|
+
"bool": {
|
|
317
|
+
"must": [
|
|
318
|
+
{ "match": { "level": "ERROR" } },
|
|
319
|
+
{ "range": { "@timestamp": { "gte": "now-1h" } } }
|
|
320
|
+
],
|
|
321
|
+
"filter": [
|
|
322
|
+
{ "term": { "service": "api-gateway" } }
|
|
323
|
+
]
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### Aggregations
|
|
330
|
+
|
|
331
|
+
```json
|
|
332
|
+
// Count by log level
|
|
333
|
+
GET logs-*/_search
|
|
334
|
+
{
|
|
335
|
+
"size": 0,
|
|
336
|
+
"aggs": {
|
|
337
|
+
"log_levels": {
|
|
338
|
+
"terms": { "field": "level" }
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// Error rate over time
|
|
344
|
+
GET logs-*/_search
|
|
345
|
+
{
|
|
346
|
+
"size": 0,
|
|
347
|
+
"aggs": {
|
|
348
|
+
"errors_over_time": {
|
|
349
|
+
"date_histogram": {
|
|
350
|
+
"field": "@timestamp",
|
|
351
|
+
"fixed_interval": "5m"
|
|
352
|
+
},
|
|
353
|
+
"aggs": {
|
|
354
|
+
"error_count": {
|
|
355
|
+
"filter": { "term": { "level": "ERROR" } }
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
## Kibana Setup
|
|
364
|
+
|
|
365
|
+
### Index Patterns
|
|
366
|
+
|
|
367
|
+
1. Go to Stack Management → Index Patterns
|
|
368
|
+
2. Create pattern: `logs-*`
|
|
369
|
+
3. Set time field: `@timestamp`
|
|
370
|
+
|
|
371
|
+
### Saved Searches
|
|
372
|
+
|
|
373
|
+
Create saved searches for common queries:
|
|
374
|
+
- `level:ERROR` - All errors
|
|
375
|
+
- `service:api-gateway AND level:ERROR` - API gateway errors
|
|
376
|
+
- `response_time:>1000` - Slow requests
|
|
377
|
+
|
|
378
|
+
### Visualizations
|
|
379
|
+
|
|
380
|
+
Common visualization types:
|
|
381
|
+
- **Line Chart**: Error rate over time
|
|
382
|
+
- **Pie Chart**: Distribution by log level
|
|
383
|
+
- **Data Table**: Top error messages
|
|
384
|
+
- **Metric**: Total error count
|
|
385
|
+
|
|
386
|
+
### Dashboard Example
|
|
387
|
+
|
|
388
|
+
Create dashboard with:
|
|
389
|
+
1. Total log count (Metric)
|
|
390
|
+
2. Error rate trend (Line chart)
|
|
391
|
+
3. Logs by service (Pie chart)
|
|
392
|
+
4. Recent errors (Data table)
|
|
393
|
+
5. Log stream (Discover panel)
|
|
394
|
+
|
|
395
|
+
## Alerting
|
|
396
|
+
|
|
397
|
+
### Watcher (X-Pack)
|
|
398
|
+
|
|
399
|
+
```json
|
|
400
|
+
PUT _watcher/watch/error_alert
|
|
401
|
+
{
|
|
402
|
+
"trigger": {
|
|
403
|
+
"schedule": { "interval": "5m" }
|
|
404
|
+
},
|
|
405
|
+
"input": {
|
|
406
|
+
"search": {
|
|
407
|
+
"request": {
|
|
408
|
+
"indices": ["logs-*"],
|
|
409
|
+
"body": {
|
|
410
|
+
"query": {
|
|
411
|
+
"bool": {
|
|
412
|
+
"must": [
|
|
413
|
+
{ "match": { "level": "ERROR" } },
|
|
414
|
+
{ "range": { "@timestamp": { "gte": "now-5m" } } }
|
|
415
|
+
]
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
"condition": {
|
|
423
|
+
"compare": { "ctx.payload.hits.total.value": { "gt": 100 } }
|
|
424
|
+
},
|
|
425
|
+
"actions": {
|
|
426
|
+
"notify_slack": {
|
|
427
|
+
"webhook": {
|
|
428
|
+
"scheme": "https",
|
|
429
|
+
"host": "hooks.slack.com",
|
|
430
|
+
"port": 443,
|
|
431
|
+
"method": "post",
|
|
432
|
+
"path": "/services/xxx",
|
|
433
|
+
"body": "{\"text\": \"High error rate detected: {{ctx.payload.hits.total.value}} errors in last 5 minutes\"}"
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
## Common Issues
|
|
441
|
+
|
|
442
|
+
### Issue: High Disk Usage
|
|
443
|
+
**Problem**: Elasticsearch consuming too much disk
|
|
444
|
+
**Solution**: Implement ILM policies, reduce retention
|
|
445
|
+
|
|
446
|
+
### Issue: Slow Searches
|
|
447
|
+
**Problem**: Queries taking too long
|
|
448
|
+
**Solution**: Optimize index settings, add more shards, use filters
|
|
449
|
+
|
|
450
|
+
### Issue: Log Parsing Failures
|
|
451
|
+
**Problem**: Logs not parsed correctly
|
|
452
|
+
**Solution**: Test grok patterns, check for log format changes
|
|
453
|
+
|
|
454
|
+
### Issue: Memory Pressure
|
|
455
|
+
**Problem**: Elasticsearch OOM errors
|
|
456
|
+
**Solution**: Increase heap size (max 50% of RAM), limit field data
|
|
457
|
+
|
|
458
|
+
## Best Practices
|
|
459
|
+
|
|
460
|
+
- Implement index lifecycle management
|
|
461
|
+
- Use index templates for consistent mappings
|
|
462
|
+
- Parse logs at ingestion time
|
|
463
|
+
- Limit stored fields to reduce storage
|
|
464
|
+
- Use data streams for time-series data
|
|
465
|
+
- Monitor cluster health
|
|
466
|
+
- Implement proper security (X-Pack)
|
|
467
|
+
- Regular index maintenance
|
|
468
|
+
|
|
469
|
+
## Related Skills
|
|
470
|
+
|
|
471
|
+
- loki-logging (`loki-logging`) - Alternative logging stack
|
|
472
|
+
- prometheus-grafana (`prometheus-grafana`) - Metrics monitoring
|
|
473
|
+
- audit-logging (`audit-logging`) - Compliance logging
|
|
474
|
+
|
|
475
|
+
## Limitations
|
|
476
|
+
|
|
477
|
+
- Guidance executes against real environments: confirm target, blast radius, and rollback plan before applying anything.
|
|
478
|
+
- Never deploy to production without explicit approval. Docs-only import: upstream scripts and templates not bundled.
|
|
479
|
+
|
|
480
|
+
### Example
|
|
481
|
+
|
|
482
|
+
```bash
|
|
483
|
+
git status && git diff --stat
|
|
484
|
+
kubectl diff -f manifest.yaml
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
> Adapted from [BagelHole/DevOps-Security-Agent-Skills](https://github.com/BagelHole/DevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use/Limitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.
|