Skip to main content

Using the CLI

You can interact with the agent with the command line application to manage the agent to do administration operations. In the following lines there is a basic tutorial.

$ pulsar --help
Pulsar cli

USAGE:
pulsar [OPTIONS] <SUBCOMMAND>

OPTIONS:
--api-server <API_SERVER> Specify custom api server
-h, --help Print help information
-v, --verbose Pass many times for a more verbose output. Passing `-v` adds
debug logs, `-vv` enables trace logging
-V, --version Print version information

SUBCOMMANDS:
config Manage module configuration
restart Restart a module
start Start a module
status Modules status
stop Stop a module
#

The status subcommand lists the running modules:

$ pulsar status
+---------------------+---------+---------+
| MODULE | VERSION | STATUS |
+=========================================+
| file-system-monitor | 0.0.1 | Running |
|---------------------+---------+---------|
| logger | 0.0.1 | Running |
|---------------------+---------+---------|
| network-monitor | 0.0.1 | Running |
|---------------------+---------+---------|
| process-monitor | 0.0.1 | Running |
|---------------------+---------+---------|
| rules-engine | 0.0.1 | Running |
|---------------------+---------+---------|
| syscall-monitor | 0.0.1 | Stopped |
+---------------------+---------+---------+

You can start and stop modules with start and stop:

$ pulsar start syscall-monitor
Module started

$ pulsar stop network-monitor
Module stopped

$ pulsar status
+---------------------+---------+---------+
| MODULE | VERSION | STATUS |
+=========================================+
| file-system-monitor | 0.0.1 | Running |
|---------------------+---------+---------|
| logger | 0.0.1 | Running |
|---------------------+---------+---------|
| network-monitor | 0.0.1 | Stopped |
|---------------------+---------+---------|
| process-monitor | 0.0.1 | Running |
|---------------------+---------+---------|
| rules-engine | 0.0.1 | Running |
|---------------------+---------+---------|
| syscall-monitor | 0.0.1 | Running |
+---------------------+---------+---------+

Finally, you can change the configuration of a module:

$ pulsar config --set file-system-monitor.elf_check_enabled=false
Configuration updated

$ pulsar config --module file-system-monitor
+-------------------+-------+
| KEY | VALUE |
+===========================+
| elf_check_enabled | false |
+-------------------+-------+