360 Secure SkillHub
360 安全技能中心

cx-olly

该 Skill 指导使用 cx CLI 调用 Coralogix Olly,支持自然语言可观测性问答、聊天与工件管理,以及定时任务和规则管理;主要依赖外部 Coralogix 服务、cx CLI 和 API 凭据。

分类:数据
coralogix
热度 59.36
最近更新 2026-12-04 05:11:47

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add coralogix/cx-cli/cx-olly
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
cx-olly
description
This skill should be used when the user asks to "chat with AI", "ask Olly", "ask the agent", "send message to AI", "continue a chat", "follow up on chat", "list chats", "find a chat ID", "show chat history", "rename a chat", "delete a chat", "share a chat", "stop a running Olly answer", "cancel a running answer", "which models does Olly support", "list Olly models", "schedule an Olly prompt", "Olly scheduled task", "run Olly every day", "watch a dashboard with Olly", "list scheduled tasks", "pause a scheduled task", "run a scheduled task now", "scheduled task run history", "get artifact", "download artifact", "list artifacts", "retrieve generated content", "AI-generated charts", "AI analysis", "conversational observability", "natural language query", "Olly rules", "list Olly rules", "add a rule for Olly", "team rules", "custom instructions for Olly", or wants to interact with the Coralogix Observability Agent (Olly) using the cx CLI.
metadata
{"version":"0.1.0"}

Olly Observability Agent Skill

Use this skill to interact with Coralogix's Observability Agent (Olly) via the cx olly CLI commands. Olly can analyze your observability data, answer questions about alerts, metrics, logs, and generate artifacts like charts and reports.

cx olly ask defaults --agent-to-agent-mode to false. If you're an LLM/agent, pass --agent-to-agent-mode - see "Agent-to-agent mode" below.

CLI Commands

Command Purpose Key flags
cx olly ask "message" Send a message to the Observability Agent --chat-id, --model, --timeout, --file, --agent-to-agent-mode
cx olly chats list List chats, most recently active first --type, --metadata, --limit, --offset
cx olly chats get <chat-id> Show a chat with its messages -
cx olly chats rename <chat-id> <title> Change the title --yes
cx olly chats delete <chat-id> Delete the chat and everything in it --yes
cx olly chats share <chat-id> Change who can see the chat --with, --entity-id, --yes
cx olly chats stop <chat-id> <interaction-id> Stop an answer that is still running -
cx olly models List the model IDs ask --model accepts -
cx olly artifacts list List generated artifacts, newest first --chat-id, --type, --start/--end (creation time), --limit, --offset
cx olly artifacts get <id> Get artifact content by ID -
cx olly scheduled-tasks list List your scheduled tasks --kind, --shared, --dashboard
cx olly scheduled-tasks get <task-id> Show one task -
cx olly scheduled-tasks create Create a task from flags or a JSON file --title, --prompt, --model, --reasoning-effort, --start-at, --every, --monthly, --from-file, --yes
cx olly scheduled-tasks update <task-id> Change title, prompt, model, reasoning effort or notification --title, --prompt, --model, --reasoning-effort, --from-file, --yes
cx olly scheduled-tasks set-schedule <task-id> Change when it runs --start-at, --every, --monthly, --yes
cx olly scheduled-tasks enable|disable <task-id> Turn the schedule on or off --yes
cx olly scheduled-tasks share <task-id> Change who can see the task --with, --entity-id, --yes
cx olly scheduled-tasks delete <task-id> Delete the task --yes
cx olly scheduled-tasks run <task-id> Run it now --yes
cx olly scheduled-tasks runs <task-id> Show the run history, newest first -
cx olly rules list List rules --team
cx olly rules get <rule-id> Show one rule with its full text --team
cx olly rules create --rule <text> Create a rule --team, --yes
cx olly rules update <rule-id> --rule <text> Replace a rule's text --team, --yes
cx olly rules enable <rule-id> / disable <rule-id> Turn a rule on or off --team, --yes
cx olly rules delete <rule-id> Delete a rule --team, --yes

Output format: append -o json or -o toon for machine-readable output.

Single-profile only: cx olly commands do not support multi-profile fan-out. Use -p <profile> to specify a single profile.

Running Olly (async by default)

Run cx olly ask asynchronously by default: launch it as a background process and poll it for completion rather than blocking on it. Olly investigations routinely take minutes, so this is the normal mode for cx olly ask.

Only run cx olly ask inline (foreground, blocking) for a short question you expect Olly to answer quickly — a quick lookup or a one-line follow-up. When in doubt, run it in the background.

Chat Commands

Start a new conversation

cx olly ask "What alerts fired today?" --agent-to-agent-mode

This creates a new chat and returns a response along with a Chat ID that you can use for follow-up questions. Remove --agent-to-agent-mode if you don't have context to share (like quick access to source files) or if the created chat is only for human usage.

Continue an existing chat

cx olly ask "Tell me more about the error rates" --chat-id <chat-id> --agent-to-agent-mode

Use --chat-id to continue a conversation and maintain context from previous messages. Background the follow-up too when it kicks off another investigation.

Model selection

The default is gpt-5.2. The available models differ by region and change over time, so list them instead of guessing:

cx olly models
cx olly ask "Explain this error" --model <model-id> --agent-to-agent-mode

Timeout

For complex queries that may take longer, increase Olly's response timeout (default: 900 seconds):

cx olly ask "Deep analysis of last week's incidents" --timeout 1800 --agent-to-agent-mode

--http-timeout <SECONDS> (or CX_HTTP_TIMEOUT) sets the HTTP request deadline for all CLI commands, including Olly. It is separate from the Olly response timeout.

Attaching files

--file <path> attaches a file to the message. Repeat the flag for several files:

cx olly ask "What is wrong in this screenshot?" --file error.png --file requests.csv --agent-to-agent-mode
  • Types, taken from the file extension: .png, .jpg, .jpeg, .webp, .pdf, .json, .csv, .txt, .md. For any other text file (a .log, a .yaml), copy it to a .txt file first.
  • Limits, at the time of writing: 5 files per message; 2 MB for each image or PDF; 200 KB for each text file, and 200 KB for all text files of one message together. The CLI reads the current limits from Olly and checks them before it uploads anything, so cut a large log down to the relevant lines first.
  • A file belongs to one message. To refer to it again in the same chat, just ask with --chat-id; do not attach it again unless it changed.
  • --file works with --chat-id and --no-wait.
  • Each file upload has its own 60 second limit. --http-timeout does not change it.
  • If a file is rejected, nothing is sent and no chat is created: fix the file and run the command again.
  • API keys: if the error says Olly refused the API key for file attachments, the region does not accept API keys for attachments yet. Tell the user to use a logged-in profile (cx profiles add --oauth).

Agent-to-agent mode

--agent-to-agent-mode defaults to false, since cx olly ask is used directly by humans as well as by agents. If you're an LLM/agent, pass --agent-to-agent-mode to opt into shorter, sub-agent-style responses: no charts/tables, clarifying questions instead of guessing, and reliance on your broader context.

cx olly ask "Analyze this for me" --agent-to-agent-mode

It's per-call, not per-chat. --chat-id does not remember it - re-pass --agent-to-agent-mode on every follow-up turn, or the mode silently flips back to human-facing mid-conversation.

Chats

Find a chat

cx olly chats list
cx olly chats list --type ai_connector --limit 10
cx olly chats list --limit 50 --offset 50
cx olly chats list --metadata '{"scheduled_task_id":"<id>"}' -o json

Chats are listed most recently active first, 50 at a time by default (--limit 1-10000, --offset to page). Use the id with cx olly ask --chat-id or cx olly chats get.

  • --type is one of web, api, slack, teams, query_assistant, ai_connector, cases, scheduled. Chats created by cx olly ask are ai_connector.
  • --metadata takes a JSON object and returns only the chats whose metadata contains it. Invalid JSON fails before any request is sent.

Read a chat

cx olly chats get <chat-id>
cx olly chats get <chat-id> -o json

Text mode prints the conversation in order (who said what). -o json prints the full API response, including messages and interactions. In text and toon mode a chat over the configured size limit is written to a temp file and the path is printed.

Rename, share, delete

These change the chat, so they need confirmation. As an agent, ask the user first, then re-run with --yes. --read-only blocks them.

cx olly chats rename <chat-id> "Checkout latency investigation" --yes
cx olly chats share <chat-id> --with org --yes
cx olly chats share <chat-id> --with private --yes
cx olly chats share <chat-id> --with entities --entity-id <id> --entity-id <id> --yes
cx olly chats delete <chat-id> --yes
  • share --with is private (only the owner), org (the whole organization) or entities (the IDs given with --entity-id, which is required for entities and rejected otherwise).
  • An entity ID is a user's user_id (a UUID, not user_account_id) from cx iam users search -o json, run with the same profile as the share command. That command returns 300 users per page and ignores --query, so filter the output yourself: cx iam users search -o json | jq '{rows: length, match: [.[] | select((.email // "" | ascii_downcase) == ("<email>" | ascii_downcase))]}'. If match is empty and rows is 300, repeat with --page-token 300, then 600, and so on. Match by email. If you only have a name, read every page before you decide (stop only when rows is under 300), because two users can share a name; if several match, ask which one. Never pass a name, an email or a team group's ID: the API matches the exact user ID, so a group ID gives no one access. The API accepts any string and still reports success, so the success message does not prove the ID matched anyone. --entity-id replaces the chat's whole list: to add or remove one person, read the current IDs from shared_options.shared_entity_ids in cx olly chats get <chat-id> -o json and pass the full new list. If no one is left on the list, use --with private instead.
  • delete also deletes the chat's interactions, artifacts and uploaded files. It cannot be undone.
  • Only the chat's owner can rename, share, delete or stop it. Anyone else gets a 404, the same answer as for a chat that does not exist. Report a 404 as "not found, or not your chat", never as "deleted".

Stop a running answer

cx olly chats stop <chat-id> <interaction-id>

stop runs without a confirmation prompt (--read-only still blocks it).

Killing a background cx olly ask does not stop Olly: the answer keeps running on the server. To stop it:

  1. Find the chat. Use the chat ID you passed with --chat-id; for a new chat, it is the newest one in cx olly chats list.
  2. Find the running interaction: the one with status in_progress under interactions in cx olly chats get <chat-id> -o json.
  3. Run cx olly chats stop <chat-id> <interaction-id>. Only after that, kill the background ask process.

If the answer has already finished, the command fails with the API's message (400).

Artifacts

Olly can generate artifacts like query results, previews, and citations. Artifact IDs appear as links in the agent's response text.

List artifacts

cx olly artifacts list
cx olly artifacts list -o json
cx olly artifacts list --chat-id <chat-id>
cx olly artifacts list --type coralogix_metrics --start now-1d
cx olly artifacts list --limit 5 --offset 5

With no flags it returns the newest 100 artifacts across all chats. Narrow it with:

Flag Meaning
--chat-id <id> Only artifacts from one chat (the chat ID that cx olly ask prints)
--type <type> One of coralogix_dataprime, coralogix_metrics, kubernetes_query_results, alert_watch_data, github_file_content, sandbox_generated_file, schema_health_suggestions
--start <time> / --end <time> Creation time window, inclusive. ISO 8601 or relative (now-1h)
--limit <n> / --offset <n> Paging. --limit 5 --offset 5 is the second page of five

Each row has id, type, chat_id, chat_title, chat_type, interaction_id and created_at. The list carries no content. Use artifacts get <id> for the content.

Get artifact content

cx olly artifacts get <artifact-id>
cx olly artifacts get <artifact-id> -o json

The artifacts get command automatically:

  1. Fetches artifact metadata
  2. Downloads content from the presigned URL
  3. Decompresses gzip content
  4. Parses JSON and uses spill logic for large content
  5. Saves non-JSON text to a temp file

Output behavior:

  • JSON content: Displayed directly, or spilled to file if large
  • Text content: Saved to temp file (e.g., /tmp/cx_results_artifact_<id>_<hash>.txt)

Scheduled tasks

A scheduled task is a prompt Olly runs on a schedule. It can watch a dashboard, and it can notify people about the result.

Scheduled tasks need a personal API key or a logged-in profile. With a team API key (cxtp_...) every scheduled-tasks command stops before any request and asks for a personal key; switch profile with -p or ask the user for a personal key. Creating and running a task also needs AI consent to be on for the team. create, update, set-schedule, enable and share also need the olly-scheduled-tasks:Manage permission; disable, delete and run do not. A 403 with a personal key means AI consent is off or the user lacks that permission.

Every command that changes something (create, update, set-schedule, enable, disable, share, delete, run) needs confirmation. As an agent, ask the user first, then re-run with --yes. --read-only blocks them.

Find and read tasks

cx olly scheduled-tasks list                           # tasks you own
cx olly scheduled-tasks list --shared                  # tasks other users shared with you
cx olly scheduled-tasks list --kind watch_dashboard
cx olly scheduled-tasks list --dashboard <dashboard-id>
cx olly scheduled-tasks get <task-id>
cx olly scheduled-tasks get <task-id> -o json

--kind cannot be combined with --dashboard. A user can own a limited number of tasks; when create reports that the quota is reached, show the user their tasks (list) and ask which one to delete.

Create a task

A plain task needs only flags. --model takes a model ID from cx olly models.

# Every day, first run in one hour
cx olly scheduled-tasks create --title "Daily errors" --prompt "Summarize new errors in the last 24h" \
    --model <model-id> --start-at now+1h --every 1d --yes
# Once, tomorrow
cx olly scheduled-tasks create --title "Deploy check" --prompt "Did the 09:00 deploy raise errors?" \
    --model <model-id> --start-at now+1d --yes
  • --start-at is now+<duration> (now+1h, now+3d) or an ISO-8601 time with a timezone. It must be in the future and at most one month ahead.
  • --every is a whole number of hours from 1h to 1w (6h, 1d, 1w). --monthly repeats every month. With neither, the task runs once.
  • --reasoning-effort is none, minimal, low, medium (default), high or xhigh.

A task with a notification, a dashboard to watch, sharing, or more than one fixed run time (future_runs) needs cx olly scheduled-tasks create --from-file task.json --yes (- reads stdin). The file is the API's create body:

{
  "title": "Checkout dashboard watch", "prompt": "Check the checkout dashboard for anomalies",
  "model_choice": "<model-id>", "reasoning_effort": "medium", "next_run_at": "<ISO-8601 time>",
  "interval_seconds": 86400, "enabled": true, "kind": "watch_dashboard",
  "metadata": {"dashboard_url": "https://<team>.app.coralogix.com/#/dashboards/<id>"},
  "notification": {"type": "on_condition", "condition": "error rate above 5%", "connector_ids": ["<connector-id>"]},
  "shared_options": {"shared_type": "entire_organization"}
}
  • Only title, prompt, model_choice and next_run_at (the first run, what --start-at sets) are required. A key the API does not read (a misspelled key, for example) fails the command before any request; the read-only keys of get -o json (id, owner, last_run_at, ...) are accepted.
  • interval_seconds is a whole number of hours from 3600 to 604800. Use "interval_months": 1 instead for monthly. Leave both out for a one-off.
  • A one-off may add up to 5 more run times in future_runs: a list of times in order, the first 1 hour to 1 month after next_run_at and each next one 1 hour to 1 month after the one before. A recurring task cannot have them. Example: "next_run_at": "<first time>", "future_runs": ["<second time>", "<third time>"], with no interval_seconds.
  • Times in a file are ISO-8601 with a timezone (now+1h works only in --start-at). Get the current time with date -u +%Y-%m-%dT%H:%M:%SZ before you write them.
  • kind is standard (default; no metadata) or watch_dashboard (needs metadata.dashboard_url).
  • notification.type is every_run (after every run), olly_judges (Olly decides whether the result is worth a notification) or on_condition (when condition is met; the only type that takes condition). connector_ids takes 1 to 5 email, Slack or Microsoft Teams connector IDs from cx notifications connectors list.
  • shared_options.shared_type is private (default), entire_organization, or specific_entities with shared_entity_ids (user IDs; see chats share above for where they come from).

To copy a task, save it with get -o json, edit the file and create it again. Give it a new title. In a saved task next_run_at is the next run, not the first one: it is null when a one-off has finished and can be in the past when the task is disabled. Set it (and future_runs, if any) to times that are still ahead, and set enabled to true if the copy should run.

Change a task

cx olly scheduled-tasks update <task-id> --title "Daily error summary" --model <model-id> --reasoning-effort high --yes
cx olly scheduled-tasks update <task-id> --from-file changes.json --yes   # e.g. {"notification": null}
cx olly scheduled-tasks set-schedule <task-id> --start-at now+1h --every 6h --yes
cx olly scheduled-tasks disable <task-id> --yes   # `enable` takes the same form
cx olly scheduled-tasks share <task-id> --with org --yes
cx olly scheduled-tasks delete <task-id> --yes
  • update changes only the fields you pass. The notification can only be changed from a file; "notification": null stops notifications. An update file may hold title, prompt, model_choice, reasoning_effort and notification; any other key fails the command.
  • set-schedule replaces the whole schedule: without --every or --monthly the task becomes a one-off. It always clears future_runs, and no command can change them afterwards. Before set-schedule on a task that has them (get shows Future runs), tell the user they will be lost; to keep or change them, create the task again from a file and delete the old one. It also turns a disabled task on; run disable afterwards to keep it paused.
  • enable and disable keep the schedule, including future_runs. Run times that passed while the task was disabled are skipped, not run late: enable moves the task to its next run time that is still ahead and prints it as Next run. A one-off task with no run time left cannot be enabled; give it a new time with set-schedule, which also enables it.
  • share --with takes private, org or entities (with --entity-id). Entity IDs are user IDs, found the same way as for chats share above. --entity-id replaces the task's whole list: to add or remove one person, read the current IDs from shared_options.shared_entity_ids in get -o json (text output does not show them) and pass the full new list. If no one is left on the list, use --with private instead. Everyone the task is shared with can read the task, its run history and its run chats. A task whose prompt uses /case-management is shared with the whole organization when it is created, and share --with private or entities fails for it.
  • Only the owner can change, run, share or delete a task. For a task that is only shared with you, these commands fail and name the owner.
  • A title must be unique among your tasks, and one dashboard can have one watch task. A second one fails with "already exists".

Run a task and read the result

cx olly scheduled-tasks run <task-id> --yes     # starts a run in the background
cx olly scheduled-tasks runs <task-id>          # status, times, error reason, chat ID, interaction ID
cx olly chats get <chat-id>                     # read the run's answer
cx olly ask "Summarize this run" --chat-id <chat-id>   # ask about the run in its chat (owner only; a shared task's run chat is read-only)

run returns as soon as the run starts and prints the runs command to follow it. A manual run sends the task's notifications like a scheduled run. In runs, the status is pending, running, succeeded, failed or stopped; a failed run has an error reason (quota_exceeded, ai_consent_denied, permission_denied, timeout, general_error, notification_verdict_not_reported). Check runs about every 30 seconds until the newest run is no longer pending or running, then read its chat. If it is still running after about 10 minutes, tell the user and stop polling. runs -o json also has notification_verdict and notification_message.

Rules

Rules are instructions Olly follows when it answers. Personal rules apply to your own chats. Team rules apply to everyone on the team. Without --team the commands act on personal rules; with --team they act on team rules.

List and read rules

cx olly rules list
cx olly rules list --team -o json
cx olly rules get <rule-id>
cx olly rules get <rule-id> --team -o json

A rule has id, rule (the text), enabled and created_at. The list table cuts long rule text; -o json and rules get show the full text.

Create and change rules

cx olly rules create --rule "Answer in English" --yes
cx olly rules create --rule "Always link the runbook" --team --yes
cat rule.txt | cx olly rules create --rule - --yes
cx olly rules update <rule-id> --rule "Answer in English, briefly" --yes
cx olly rules disable <rule-id> --team --yes
cx olly rules enable <rule-id> --team --yes
cx olly rules delete <rule-id> --yes
  • --rule - reads the rule text from stdin.
  • create, update, enable, disable and delete ask for confirmation. In agent mode they fail without --yes: ask the user to confirm, then re-run with --yes. --read-only blocks all five.
  • create and update print the rule with -o json, so the new rule's id can be read from the output.
  • 422 means Olly rejected the rule text (it looks like a prompt injection or contains foul language). The error shows Olly's reason.
  • 403 on personal rules usually means the profile uses a team API key. Personal rules need a personal API key or a logged-in profile. Team rules work with any API key that has the permissions below.
  • Team rule permissions: reading needs olly-team-rules:Read or olly-team-rules:Manage; writing needs olly-team-rules:Manage.
  • Disabled team rules are visible only with olly-team-rules:Manage. Without it, list leaves them out and get returns 404.

Workflow Examples

Investigate an issue

# Start investigation — run in the background and poll for completion
cx olly ask "Why is the checkout service showing high latency? Check logs with 'checkout:' strings and aws related metrics" --agent-to-agent-mode

# Follow up with the chat ID from the response — also background and poll
cx olly ask "What changed in the last hour?" --chat-id 3f2b8c1e-7a4d-4e9b-9c2a-1d5e6f7a8b9c --agent-to-agent-mode

# Once the interaction has completed, get any generated charts
cx olly artifacts list --chat-id 3f2b8c1e-7a4d-4e9b-9c2a-1d5e6f7a8b9c -o json | jq -r '.[].id'
cx olly artifacts get <artifact-id>

Get JSON output for scripting

# Get response as JSON
cx olly ask "List top 5 error messages" -o json --agent-to-agent-mode | jq '.response'

# Parse artifacts
cx olly artifacts list -o json | jq '.[] | {id, type, chat_title, created_at}'

Detailed analysis with specific model

cx olly ask "Perform root cause analysis for the outage on 2024-01-15" \
  --model claude-sonnet-4-5 \
  --timeout 1800 \
  --agent-to-agent-mode

Key Principles

  • Async by default - run cx olly ask as a background process and poll it for completion; only run inline (blocking) for short questions you expect Olly to answer quickly
  • Chat IDs enable context - save the Chat ID from responses to continue conversations; cx olly chats list finds one you lost
  • Do not guess model IDs - run cx olly models
  • Use -o json for scripting - pipe to jq for filtering and extraction
  • Artifact IDs are in response text - look for markdown links like [Chart](https://...artifact_view/<id>)
  • Single-profile only - cx olly does not support multi-profile queries
  • Scheduled tasks need a personal API key - a team API key is refused on every cx olly scheduled-tasks command
  • Large artifacts auto-spill - JSON content over the configured limit is saved to temp files
  • Check source code before asking - give Olly concrete context from the source code if available, such as which metric to start investigating from, before calling it
  • Limit investigation scope - guide Olly to the correct limited scope, for example limit to just logs or to specific time ranges
  • Pass --agent-to-agent-mode when calling as an LLM/agent - it defaults to false (human-facing); agents should opt in for shorter, sub-agent-style responses

Related Skills

  • cx-telemetry-querying - for direct DataPrime/PromQL queries without AI agent assistance (covers logs, spans, metrics, RUM)
  • cx-alerts - for managing alert definitions