Remote Monitoring¶
pcp-mcp can monitor any host running PCP's pmcd daemon. There are two architectures for remote monitoring:
Architecture 1: Remote Target via Local pmproxy¶
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
│ LLM │ ◄─MCP─► │ pcp-mcp │ ◄─HTTP─► │ pmproxy │ ◄─────► │ pmcd │
└─────────┘ └─────────┘ │ (local) │ │ (remote)│
└─────────┘ └─────────┘
Use case: Monitor remote hosts through your local pmproxy.
Setup:
Or via environment:
Requirements: - Local pmproxy must have network access to remote pmcd (port 44321) - Remote pmcd must allow connections from pmproxy's host
Architecture 2: Remote pmproxy¶
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
│ LLM │ ◄─MCP─► │ pcp-mcp │ ◄─HTTP─► │ pmproxy │ ◄─────► │ pmcd │
└─────────┘ └─────────┘ │ (remote)│ │ (remote)│
└─────────┘ └─────────┘
Use case: Connect directly to a remote pmproxy server (e.g., centralized metrics gateway).
Setup:
Requirements: - Network access to remote pmproxy (port 44322) - Optional: TLS if pmproxy is configured with HTTPS
Configuration Examples¶
Monitor Multiple Hosts¶
Create different MCP server configurations:
{
"mcpServers": {
"pcp-web1": {
"command": "pcp-mcp",
"args": ["--target-host", "web1.example.com"]
},
"pcp-db1": {
"command": "pcp-mcp",
"args": ["--target-host", "db1.example.com"]
}
}
}
Secure Connection (TLS)¶
If pmproxy is configured with HTTPS:
Authentication¶
If pmproxy requires HTTP basic auth:
export PCP_USERNAME=metrics_user
export PCP_PASSWORD=secure_password
export PCP_HOST=metrics.example.com
pcp-mcp
Firewall Configuration¶
pmcd (port 44321)¶
If using Architecture 1, ensure pmproxy can reach pmcd:
pmproxy (port 44322)¶
If using Architecture 2, ensure pcp-mcp can reach pmproxy:
Troubleshooting¶
Connection Refused¶
Solution: Ensure pmproxy is running:
Target Host Unreachable¶
Solution: Check network connectivity and firewall rules:
Timeout Errors¶
Solution: Increase timeout for slow networks: