zms-troubleshoot-agent-deployment
Troubleshoot Zscaler Microsegmentation (ZMS) agent deployment and connectivity issues. Investigates agent fleet health, connection status, version compliance, agent group configuration, provisioning keys, and TOTP secrets. Use when an administrator reports: 'Agents are disconnected', 'Agent enrollment failing', 'How do I provision new agents?', 'Check agent versions', or 'Agent not connecting.'
What this skill does
# ZMS: Troubleshoot Agent Deployment ## Keywords agent deployment, agent enrollment, agent disconnected, provisioning key, nonce, TOTP, agent version, agent connectivity, agent group, agent health, microsegmentation agent, agent upgrade, agent troubleshoot ## Overview Troubleshoot Zscaler Microsegmentation (ZMS) agent deployment, enrollment, and connectivity issues. This skill systematically investigates agent fleet health, identifies disconnected or outdated agents, verifies agent group configuration, checks provisioning key availability, and retrieves enrollment credentials. It covers the full agent lifecycle from initial provisioning through ongoing health monitoring. The ZMS API is a GraphQL endpoint on OneAPI. The full API supports both Query (read) and Mutation (write) operations for agents, agent groups, and nonces: - **Query operations** (available via MCP): `agents`, `agentGroups`, `AgentConnectionStatusStatisticsConnection`, `agentVersionStatistics`, `nonces`, `nonce` - **Mutation operations** (not yet in MCP, available via API/portal): `agentUpdate`, `agentDelete`, `agentGroupCreate/Update/Delete`, `agentGroupUpgradeStatusReset`, `nonceCreate/Update/Delete`, `nonceWithAgentGroupCreate` **Use this skill when:** An administrator reports agents not connecting, enrollment failures, version mismatches, or needs to set up provisioning for new agent deployments. **Important:** - All ZMS tools require `ZSCALER_CUSTOMER_ID` to be set as an environment variable. - All current MCP tools are **read-only** (Query operations). Write operations (create/update/delete agents, groups, nonces) must be performed through the Zscaler admin portal or the ZMS API directly. - GraphQL errors may return HTTP 200 with errors in the response body — always check for the `errors` field. --- ## Workflow Follow this 6-step process to troubleshoot agent deployment. ### Step 1: Identify the Problem Gather from the administrator: **Required:** - What is the symptom? (agent not connecting, enrollment failure, version mismatch, missing agent) - Which agents or hosts? (hostname, IP, agent group) - When did the issue start? **Helpful:** - Is this a new deployment or an existing agent? - Cloud provider (AWS, Azure, GCP, on-premises)? - OS type and version? - Any recent infrastructure changes? - Error messages from the agent installer? --- ### Step 2: Check Overall Fleet Health **Get connection status statistics:** ```text zms_get_agent_connection_status_statistics() ```text This provides the fleet-wide overview: - Total agent count - Connected vs disconnected counts and percentages - Per-type and per-status breakdown **Assess fleet health:** - **> 95% connected**: Healthy fleet -- issue is likely isolated - **90-95% connected**: Some connectivity issues -- check network - **< 90% connected**: Widespread issue -- check infrastructure **Get version statistics:** ```text zms_get_agent_version_statistics() ```text Check for: - Number of distinct versions in use (should be minimal) - Agents on deprecated or unsupported versions - Upgrade rollout progress --- ### Step 3: Find the Specific Agent **Search for the problematic agent:** ```text zms_list_agents(search="<hostname_or_ip>", page_size=20) ```text **If agent is found**, check: - **connectionStatus**: Is the agent connected, disconnected, or in another state? - **version**: Is the agent running the latest version? - **os**: Is the OS supported? - **ipAddresses**: Are the IP addresses correct for the expected network? - **agentGroup**: Is the agent in the correct group? - **lastSeen**: When was the agent last active? **If agent is NOT found:** - The agent was never enrolled, or enrollment failed - The agent may be registered under a different hostname/IP - Try broader search or list all agents: ```text zms_list_agents(page=1, page_size=100) ``` --- ### Step 4: Verify Agent Group Configuration **List agent groups:** ```text zms_list_agent_groups(page=1, page_size=50) ```text For each group, verify: - **Type**: Cloud provider type or on-premises - **Agent count**: Expected number of agents - **Policy status**: Whether policies are applied to the group - **Auto-upgrade settings**: Whether agents auto-upgrade - **Upgrade schedule**: Scheduled upgrade windows - **Tamper protection**: Whether tamper protection is enabled **Sort by name for easier navigation:** ```text zms_list_agent_groups(sort="name", sort_dir="ASC", page_size=50) ```text **Get TOTP secrets for enrollment (if enrollment is the issue):** ```text zms_get_agent_group_totp_secrets(eyez_id="<agent_group_eyez_id>") ```text The TOTP secret is required for agent enrollment. This returns: - **TOTP secret**: The secret key for generating one-time passwords - **QR code**: For scanning with an authenticator app - **Generation timestamp**: When the secret was created --- ### Step 5: Check Provisioning Keys (Nonces) **List available provisioning keys:** ```text zms_list_nonces(page=1, page_size=50) ```text Provisioning keys (nonces) are one-time keys used to register new agents. For each key, check: - **name**: Descriptive key name - **value**: The actual provisioning key string - **maxUsage**: Maximum number of times the key can be used - **usageCount**: How many times the key has been used - **agentGroup**: Which agent group the key enrolls agents into - **productType**: The product type the key is for - **created/modified**: Key timestamps **Common provisioning key issues:** - **Key exhausted**: `usageCount >= maxUsage` -- create a new key (via `nonceCreate` mutation in the API/portal) - **Wrong agent group**: Key enrolls into the wrong group -- verify with `zms_get_nonce()` - **Expired key**: Key was created long ago and may have been deactivated - **Need key + new group**: The API supports `nonceWithAgentGroupCreate` to create both a provisioning key and a new agent group simultaneously (via portal/API only) **Search for a specific key:** ```text zms_list_nonces(search="<key_name>") ```text **Get specific key details:** ```text zms_get_nonce(eyez_id="<nonce_eyez_id>") ```text --- ### Step 6: Present Diagnosis and Resolution #### Diagnosis Template ```text ZMS Agent Deployment Troubleshooting Report ============================================= Date: <current_date> Reported by: <administrator> ## Issue Summary - **Symptom:** <Agent not connecting / Enrollment failing / Version mismatch> - **Affected:** <hostname(s) / agent group / all agents> - **Duration:** <Since when> - **Severity:** <Critical / High / Medium / Low> - **Status:** <Root cause identified / Investigating> --- ## Fleet Health Overview | Metric | Value | Status | |--------------------|------------|-----------| | Total Agents | 245 | -- | | Connected | 238 (97%) | Healthy | | Disconnected | 7 (3%) | 3 expected | | Agent Versions | 3 in use | Review | | Latest Version | v4.2.1 | Target | --- ## Investigation Results ### Agent Status - **Hostname:** web-srv-03 - **Connection Status:** DISCONNECTED - **Last Seen:** 3 days ago - **Version:** v4.1.8 (OUTDATED -- latest is v4.2.1) - **OS:** Ubuntu 22.04 - **Agent Group:** Production Web Servers - **IP Address:** 10.0.1.45 ### Agent Group Configuration - **Group:** Production Web Servers - **Auto-Upgrade:** Disabled - **Tamper Protection:** Enabled - **Policy Status:** Active - **Agent Count:** 12 ### Provisioning Key Status - **Available Keys:** 3 - **"Prod Web Key":** 45/50 used (90% -- nearing limit) - **"Staging Key":** 12/100 used (12% -- available) --- ## Root Cause <Describe the identified root cause> Examples: - Agent disconnected due to network configuration change on the host - Enrollment failing because provisioning key has reached max usage - Agent running outdated version that is incompatible with current policies - Agent group auto-upgrade is disabled, preventing version updates ---
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.