Using Chronicle CLI commands

The Chronicle server and agent expose additional commands that can be used from the CLI for troubleshooting purposes.

chronicle CLI commands

The chronicle CLI tool is to be used with hosts running the Chronicle server. It supports the following commands:

chronicle status

The output of this command provides a summary of the server’s recent activity. Below is an example of the status command output captured a few seconds after server startup:

Chronicle Server Status
  Version:      2024.11.0
  Last Start:   2024-11-13T19:56:20Z
  Up Time:      3s
  Agents Reporting:
    No agents have reported in yet
  Storage Locations:
    /var/lib/posit-chronicle/data
      No data stored yet
      No storage errors
  Refined Metrics:
    No metrics have been refined yet

This output displays the version of the currently running Chronicle server, the server’s start time, and its uptime. The status command reports information specific to the current server instance, so the output only includes events that have occurred since the last startup.

When a server first starts, it is normal for it not to have received any messages from agents and, therefore, not to have stored any data or refined any metrics. Assuming one or more agents are running, within a few minutes of startup, the output of this command should show that data has been received from the agents and stored.

Below is an example of the output from a server that has been running for just over a day. It includes several refined metrics along with the other information.

Chronicle Server Status
  Version:      2024.11.0
  Last Start:   2024-11-13T19:56:20Z
  Up Time:      25h14m36s
  Agents Reporting:
    Host (product name)        Last Received
    ubuntu-rsc (connect)       2024-11-14T21:10:11Z
  Storage Locations:
    /var/lib/posit-chronicle/data
      Last data stored: 2024-11-14T21:10:11Z
      No storage errors
  Refined Metrics:
    Name                               Timestamp
    connect_build_info                 2024-11-14T21:01:14Z
    connect_content                    2024-11-14T21:01:14Z
    connect_installed_versions_python  2024-11-14T21:01:14Z
    connect_installed_versions_r       2024-11-14T21:01:14Z
    connect_license_active_users       2024-11-14T21:01:14Z
    connect_license_user_seats         2024-11-14T21:01:14Z
    users                              2024-11-14T19:07:40Z

chronicle-agent CLI commands

Use the chronicle-agent CLI tool with hosts running the Chronicle agent. It supports the following commands:

chronicle-agent status

The output of this command provides a summary of the agent’s recent activity. The output includes information about:

  • the agent
  • the Posit products that the agent is receiving data from, and
  • the Chronicle server the agent is sending its data to

This data is all limited to the currently running agent process, so it does not include information from any point before the time the agent process started.

Here is an example of the output of this command from an agent receiving data from Posit Connect:

Chronicle Agent Status
  Version:      2024.11.0
  Last Start:   2024-11-22T16:23:19Z
  Up Time:      2m34s
  Receivers Scraping:
    Receiver            Last Processed        Scrape Interval
    connect-connectapi  2024-11-22T16:25:19Z  1m0s
    connect-prometheus  2024-11-22T16:24:57Z  1m0s
    connect-userlist    2024-11-22T16:23:19Z  24h0m0s
  Chronicle Server:
    URL:   http://localhost:5252
    Last Data Sent: 2024-11-22T16:25:19Z
    Last Failure: Never
    Last Error:   N/A
  • Version: the installed, running version of the Chronicle agent
  • Last Start: the timestamp of when the currently running agent started
  • Up Time: the elapsed time since the agent was started
  • Server URL: the configured value for the Chronicle server that the agent is using to transmit data
    • Last Success: the timestamp of the last successful delivery of data to the Chronicle server
    • Last Failure: the timestamp of the last delivery of data to the Chronicle server that encountered an error
    • Last Error: the most recent error encountered when delivering data to the Chronicle server
  • Receivers Scraping: a list of receivers which are currently set up to scrape data from Posit Team products; each product may have multiple receivers associated with it
    • Receiver: this column identifies the scraping component; each component is responsible for different subsets of data from Posit Team products
    • Last Processed: the most recent timestamp that the agent scraped data from the receiver
    • Scrape Interval: the frequency with which the receiver scrapes data
Back to top