Agent Config¶
The following methods allow for interaction into the Tenable Vulnerability Management agent config API endpoints.
Methods available on tio.agent_config:
- class AgentConfigAPI(api: APISession)[source]¶
This will contain all methods related to agent config
- details(scanner_id=1)[source]¶
Returns the current agent configuration.
- Parameters:
scanner_id (int, optional) – The scanner ID.
- Returns:
Dictionary of the current settings.
- Return type:
Examples
>>> details = tio.agent_config.details() >>> pprint(details)
- edit(scanner_id=1, software_update=None, auto_unlink=None, *, concurrent_update=None, max_concurrent_update=None, hybrid_scanning_enabled=None)[source]¶
Edits the agent configuration.
- Parameters:
scanner_id (int, optional) – The scanner ID.
software_update (bool, optional) – If True, software updates are enabled for agents (exclusions may override this). If false, software updates for all agents are disabled.
auto_unlink (int, optional) – If true, agent auto-unlinking is enabled, allowing agents to automatically unlink themselves after a given period of time. If the value is 0 or false, auto-unlinking is disabled. True values are between 1 and 365.
concurrent_update (bool, optional) – If True, the number of agents that can update plugins at the same time is limited to
max_concurrent_update. If False, no limit is enforced.max_concurrent_update (int, optional) – The maximum number of agents that can update plugins at the same time, from 0 to 2500. A value of 0 prevents agents from updating plugins. The limit applies only while
concurrent_updateis enabled.hybrid_scanning_enabled (bool, optional) – Enables or disables hybrid scanning for agents.
Settings that are not specified keep their current values.
- Returns:
Dictionary of the applied settings is returned if successfully applied.
- Return type:
Examples
Enabling auto-unlinking for agents after 30 days:
>>> tio.agent_config.edit(auto_unlink=30)
Disabling auto-unlinking for agents:
>>> tio.agent_config.edit(auto_unlink=False)
Enabling software updates for agents:
>>> tio.agent_config.edit(software_update=True)
Limiting plugin updates to 500 agents at a time:
>>> tio.agent_config.edit(concurrent_update=True, max_concurrent_update=500)
Enabling hybrid scanning for agents:
>>> tio.agent_config.edit(hybrid_scanning_enabled=True)