Agent Commands

This page documents the linuxguard-agent command-line interface. Use these commands to manage the LinuxGuard agent on your system.

Command Reference

Command
Description

start

Start the LinuxGuard agent

stop

Stop the LinuxGuard agent

status

Check if the agent is running

show-config

Display current configuration

enroll

Enroll system into LinuxGuard

unenroll

Remove agent from tenant

linuxguard-agent start

Start the LinuxGuard agent.

Synopsis:

sudo linuxguard-agent start

Description:

Starts the LinuxGuard agent process. The agent typically starts automatically after installation, so this command is primarily used to manually restart the agent after it has been stopped.

linuxguard-agent stop

Stop the LinuxGuard agent.

Synopsis:

Description:

Stops the LinuxGuard agent process. While stopped, no monitoring data will be collected and the server will appear offline in the LinuxGuard console.

linuxguard-agent status

Check if the agent is running.

Synopsis:

Description:

Reports whether the LinuxGuard agent is currently running and displays the process ID if active.

Examples:

When the agent is running:

When the agent is not running:

linuxguard-agent show-config

Display current agent configuration.

Synopsis:

Description:

Displays the current agent configuration in JSON format. This command does not require sudo and is useful for verifying enrollment settings and troubleshooting configuration issues.

Example:

linuxguard-agent enroll

Enroll this system into LinuxGuard.

Synopsis:

Description:

Enrolls the system into your LinuxGuard tenant. After enrollment, the agent begins sending monitoring data to the LinuxGuard console.

Options:

Option
Required
Description

--api-key

Yes

API Key from LinuxGuard console

--tenant-id

Yes

Tenant ID from LinuxGuard console

--environment

No

Environment name to assign (e.g., production, staging, development)

--group

No

Alias for --environment (backward compatible)

--tag

No

Tag to assign (can be repeated for multiple tags)

Note: The agent accepts both --environment and --group. The --group flag is an alias for backward compatibility. Use --environment for new enrollments.

Examples:

Basic enrollment:

With environment and tags:

Success output:

Already enrolled output:

Note: After enrollment, the environment and tags are persisted locally and reused across agent restarts. To change the environment or tags, unenroll and re-enroll with the desired values.

linuxguard-agent unenroll

Remove this agent from the LinuxGuard tenant.

Synopsis:

Description:

Removes the server from LinuxGuard management. After unenrolling, the server will no longer appear in the LinuxGuard console and no monitoring data will be collected. To resume monitoring, you must run the enroll command again with valid credentials.


Related: Quick Start | Configuration Guide | Glossary

Last updated

Was this helpful?