First Discovery Run
Create a discovery scope, trigger a run, and explore the results in the knowledge graph.
Create a Scope
A scope defines what to discover. It ties a plugin to credentials and configuration. Create one via the API:
curl -X POST http://localhost:8080/api/v1/discovery/scopes \
-H "Content-Type: application/json" \
-d '{
"name": "prod-kubernetes",
"plugin": "kubernetes",
"config": {
"kubeconfig": "",
"contexts": []
},
"schedule": "0 */6 * * *"
}'This creates a scope that discovers all resources in the current Kubernetes context every 6 hours.
Trigger a Run
curl -X POST http://localhost:8080/api/v1/discovery/run \
-H "Content-Type: application/json" \
-d '{"scope_id": "prod-kubernetes"}'The run starts immediately. The API returns a run ID you can poll for status:
curl http://localhost:8080/api/v1/discovery/runs/{run_id}Inspect the Results
Once the run completes, explore what was discovered:
Service Catalog
curl http://localhost:8080/api/v1/services/Cost Intelligence
curl http://localhost:8080/api/v1/cost/intelligenceCompliance Report
curl http://localhost:8080/api/v1/complianceCypher Query
curl -X POST http://localhost:8080/api/v1/graph/query \
-H "Content-Type: application/json" \
-d '{"query": "MATCH (n) RETURN n.type, count(n) GROUP BY n.type"}'No credentials needed for Kubernetes
If you have a kubeconfig file (default location or in-cluster), the Kubernetes plugin works without additional credential setup. It is the easiest plugin for a first run.