WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function updates agent360 polling settings.
Provide at least one of the following parameters: interval or max_data_span.
The interval parameter sets the individual polling interval for each plugin. If you provide interval without any section filters, the function updates all core (global, agent, data, and execution) and default plugin (cpu, iostat, and network) sections.
The global_sections and plugin_sections parameters are only valid if you provide the interval parameter.
The max_data_span parameter is global. The agent collects metrics from multiple plugins and sends them together as a single batch.
If the requested values already match the current configuration, the function does not make changes or restart the agent360 process.
A comma-separated list of core sections to update.
It must be one of the following:
globalagentdataexecution
This parameter only applies to the interval parameter.
The polling interval in seconds. Must be a positive integer.
The maximum number of seconds between batches of metrics sent for analysis. Must be a positive integer.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/360Monitoring/set_360_agent_polling
- A server running WHM.
https://whm-server.tld:2087/json-api/360Monitoring/set_360_agent_polling
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
360Monitoring/set_360_agent_polling \
interval=300 \
max_data_span=120 \
global_sections='global,agent' \
plugin_sections='cpu,network'{ "data": { "status": 1 }, "metadata": { "command": "set_360_agent_polling", "namespace": "360Monitoring", "reason": "OK", "result": 1, "version": 1 } }