Skip to main content

Instana Comprehensive Wrapper

A comprehensive MCP (Model Context Protocol) wrapper for all 46+ Instana monitoring tools, designed for seamless integration with WatsonX Orchestrator Cloud.

🎯 Key Features

  • Complete Coverage: All 46+ tools from official mcp-instana==0.7.1 server
  • WXO Cloud Compatible: Designed to work with WatsonX Orchestrator connections
  • No Hardcoded Credentials: Relies on environment variables from WXO Cloud
  • Simple Pass-Through: Direct mapping to official Instana tools
  • Production Ready: Clean architecture, proper error handling

📦 Installation

For WatsonX Orchestrator Cloud

# Import as toolkit
Package: instana-comprehensive-wrapper==1.0.1
Command: uvx instana-comprehensive-wrapper==1.0.1 --transport stdio
Connection: Select your Instana connection (with INSTANA_API_TOKEN and INSTANA_BASE_URL)

For Local Development

pip install instana-comprehensive-wrapper

🛠️ Available Tools (46+ Tools)

Infrastructure Monitoring (1 tool)

  • analyze_infrastructure_elicitation - Two-pass infrastructure analysis for any entity type

Event Monitoring (8 tools)

  • get_event - Get specific event details by ID
  • get_kubernetes_info_events - Kubernetes events with analysis
  • get_agent_monitoring_events - Agent monitoring events
  • get_issues - Warning and issue events
  • get_incidents - Critical incident events
  • get_changes - Deployment and configuration changes
  • get_events_by_ids - Batch event retrieval

Automation/Actions (9 tools)

  • get_action_matches - Find matching actions for scenarios
  • get_actions - List all available actions
  • get_action_details - Get action details by ID
  • get_action_types - List action types
  • get_action_tags - List action tags
  • submit_automation_action - Execute automation action
  • get_action_instance_details - Get action run details
  • list_action_instances - List action run history
  • delete_action_instance - Delete action run result

Dashboard Management (1 tool)

  • manage_custom_dashboards - Complete dashboard CRUD operations

Application Resources (1 tool)

  • manage_instana_resources - Unified resource manager for metrics, alerts, settings, catalog

Website Monitoring (26 tools)

  • get_website_beacon_groups - Grouped website metrics
  • get_website_beacons - All website beacons
  • get_website_catalog_metrics - Metrics catalog
  • get_website_catalog_tags - Tags catalog
  • get_website_tag_catalog - Tag catalog for beacon type
  • get_websites - List all websites
  • get_website - Get website by ID
  • create_website - Create new website
  • delete_website - Delete website
  • rename_website - Rename website
  • get_website_geo_location_configuration - Get geo-location config
  • update_website_geo_location_configuration - Update geo-location config
  • get_website_ip_masking_configuration - Get IP masking config
  • update_website_ip_masking_configuration - Update IP masking config
  • get_website_geo_mapping_rules - Get geo mapping rules
  • set_website_geo_mapping_rules - Set geo mapping rules
  • upload_source_map_file - Upload source map
  • clear_source_map_upload_configuration - Clear source map config
  • get_website_page_load - Get page load details
  • get_website_beacon_metrics_v2 - Get beacon metrics (v2 API)

🚀 Usage Examples

Infrastructure Monitoring

# Query host metrics
{
  "tool": "analyze_infrastructure_elicitation",
  "arguments": {
    "selections": {
      "entity_type": "host",
      "metrics": ["cpu.used", "memory.used"],
      "aggregation": "mean",
      "filters": [{"name": "host.name", "value": "my-server"}],
      "timeRange": "6h"
    }
  }
}

Database Discovery

# List all databases on a host
{
  "tool": "analyze_infrastructure_elicitation",
  "arguments": {
    "selections": {
      "entity_type": "db2Database",
      "metrics": ["db2.database.name"],
      "aggregation": "mean",
      "filters": [{"name": "host.name", "value": "db-server"}],
      "timeRange": "1h",
      "groupBy": ["db2.database.name"]
    }
  }
}

Event Monitoring

# Get incidents from last 24 hours
{
  "tool": "get_incidents",
  "arguments": {
    "time_range": "last 24 hours",
    "max_events": 50
  }
}

Application Monitoring

# Get application metrics
{
  "tool": "manage_instana_resources",
  "arguments": {
    "resource_type": "metrics",
    "operation": "application",
    "params": {
      "tag_filter_expression": {
        "type": "TAG_FILTER",
        "name": "application.name",
        "operator": "EQUALS",
        "entity": "DESTINATION",
        "value": "my-app"
      },
      "metrics": ["calls", "latency"],
      "time_frame": {"windowSize": 3600000}
    }
  }
}

🔧 Configuration

Environment Variables

The wrapper expects these environment variables (provided by WXO Cloud connection):

INSTANA_API_TOKEN=your_api_token_here
INSTANA_BASE_URL=https://your-instance.instana.io

WatsonX Orchestrator Setup

  1. Create Connection:

    • Go to WXO Cloud → Connections
    • Create new connection named "instana"
    • Add Key-Value Pairs:
      • INSTANA_API_TOKEN: Your Instana API token
      • INSTANA_BASE_URL: Your Instana instance URL
  2. Import Toolkit:

    • Go to WXO Cloud → Toolkits
    • Click "Import Toolkit"
    • Package: instana-comprehensive-wrapper==1.0.1
    • Command: uvx instana-comprehensive-wrapper==1.0.1 --transport stdio
    • Connection: Select "instana"
  3. Test:

    • Create or open an agent
    • Try query: "Get CPU usage for [hostname] for the last 6 hours"

🏗️ Architecture

WXO Cloud Agent
    ↓
instana-comprehensive-wrapper (reads env vars from WXO connection)
    ↓
Spawns: uvx mcp-instana==0.7.1 (with credentials)
    ↓
Official Instana MCP Server
    ↓
Instana API

Key Design Principles

  1. No Hardcoded Credentials: All credentials from environment
  2. Simple Pass-Through: Direct mapping to official tools
  3. Minimal Transformation: Only JSON parsing for WXO compatibility
  4. Error Transparency: Errors passed through from official server

📚 Documentation

Tool Categories

  • Infrastructure: Host, database, container, Kubernetes monitoring
  • Events: Incidents, issues, changes, Kubernetes events
  • Automation: Action catalog, execution, history
  • Dashboards: Custom dashboard management
  • Applications: Metrics, alerts, settings, catalog
  • Websites: Beacon monitoring, configuration, source maps

Common Patterns

Two-Pass Infrastructure Analysis:

  1. Pass 1: Provide intent and entity to get schema
  2. Pass 2: Provide selections with exact parameters

Time Ranges:

  • Natural language: "last 24 hours", "last 2 days"
  • Milliseconds: 3600000 (1 hour), 86400000 (1 day)
  • String format: "1h", "24h", "7d"

Filtering:

{
  "filters": [
    {"name": "host.name", "value": "my-server"},
    {"name": "db2.database.name", "value": "MYDB"}
  ]
}

🔍 Troubleshooting

"Environment variables not set" Error

Cause: WXO Cloud connection not properly configured Solution:

  1. Verify connection has INSTANA_API_TOKEN and INSTANA_BASE_URL
  2. Ensure connection is selected when importing toolkit
  3. Check connection status (should show green checkmarks)

"401 Unauthorized" Error

Cause: Invalid or expired API token Solution: Update API token in WXO Cloud connection

"Host not found" Error

Cause: Hostname doesn't match Instana records Solution: Use exact hostname from Instana (case-sensitive)

Empty Results

Cause: Time range too narrow or filters too restrictive Solution: Increase time range or broaden filters

🤝 Contributing

This wrapper is designed for the DB2 DBA team's Slack bot automation project. For issues or enhancements, please contact the team.

📄 License

MIT License

🔗 Related Projects

📊 Version History

1.0.1 (2026-04-14)

  • CRITICAL FIX: Corrected tool name from analyze_infrastructure to analyze_infrastructure_elicitation
  • Fixed infrastructure analysis tool to match official mcp-instana server
  • All infrastructure queries now work correctly

1.0.0 (2026-04-14)

  • Initial release (had critical bug with wrong tool name)
  • All 46+ tools from official mcp-instana server
  • WXO Cloud compatible (no hardcoded credentials)
  • Simple pass-through architecture
  • Comprehensive documentation

Built for: DB2 DBA Team Slack Bot Automation Status: Production Ready Support: Internal Team Support

Metadata

Release files for instana-comprehensive-wrapper 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for instana-comprehensive-wrapper 1.0.1
File Size Uploaded Provenance
instana_comprehensive_wrapper-1.0.1.tar.gz 12.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for instana-comprehensive-wrapper 1.0.1
File Interpreter ABI Platform
instana_comprehensive_wrapper-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 22.4 kB

Release files / instana_comprehensive_wrapper-1.0.1.tar.gz

Download URL instana_comprehensive_wrapper-1.0.1.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d03ee174d250006bd78b3f1974e8e6cc4ee00b061649c2dc37413a6a84b0e204
BLAKE2b-256 checksum
How to use checksums
f05bb5b138117d341ab21843d7c840e18698325ddc62ffe1e3e29939b019c384
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0b1

Release files / instana_comprehensive_wrapper-1.0.1-py3-none-any.whl

Download URL instana_comprehensive_wrapper-1.0.1-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f211e0bcec33f6b5824f5cf96edbf60286d4e9d95792c340ff4e5203aeb117c4
BLAKE2b-256 checksum
How to use checksums
111a4f1a5732108c19f0baa292a923ac3c0d85d16d82871a7caf1aeaed6ff654
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0b1

Security for instana-comprehensive-wrapper 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page