The ConHive Agent is designed with flexibility in mind. Each module has its own JSON configuration file, located in the configs
directory within the agent’s workspace. If no configuration file is found for a module, default settings will be applied.
workdir/configs
:agentmanager.json
filemanager.json
The ConHive Agent includes an embedded web interface that lets you view and modify configuration settings with ease:
Modules
page.Save
to apply the changes.The configuration files use JSON format. Below is an example from agentmanager.json
:
{
"server": {
"host": "0.0.0.0",
"port": 5050,
"tls": false,
"cors": ["*"],
"username": "admin",
"password": "------"
},
"logging": {
"level": "info",
"format": "text",
"toFile": true,
"maxSizeMb": 50,
"maxBackups": 3,
"maxAgeDays": 30
},
"database": {
"enabled": false,
"folder": "backup",
"maxAgeDays": 7,
"intervalHours": 12
}
}
Note: Changes made to configuration files will only take effect after restarting the ConHive Agent.
The ConHive Agent provides several commands to manage its configuration. Below are some common operations:
To generate a new default configuration file, run:
./conhive-agent config create
To print the current configuration to the command line, run:
./conhive-agent config get
To view the location of the configuration file, run:
./conhive-agent config location
Open the desired configuration file in your favorite text editor, for example:
nano workdir/configs/agentmanager.json
Make your changes.
Save the file and restart the agent to apply the changes:
sudo systemctl restart conhive-agent.service
This guide provides an overview of the data structure and configuration management for the ConHive Agent. With a well-organized workspace and flexible configuration options, you can tailor the agent to meet your unique device management needs.