Module for managing SNMP service settings on Windows servers. The Windows feature ‘SNMP-Service’ must be installed.
salt.modules.win_snmp.
get_agent_service_types
()¶Get the sysServices types that can be configured.
Returns: | A list of service types. |
---|---|
Return type: | list |
CLI Example:
salt '*' win_snmp.get_agent_service_types
salt.modules.win_snmp.
get_agent_settings
()¶Determine the value of the SNMP sysContact, sysLocation, and sysServices settings.
Returns: | A dictionary of the agent settings. |
---|---|
Return type: | dict |
CLI Example:
salt '*' win_snmp.get_agent_settings
salt.modules.win_snmp.
get_auth_traps_enabled
()¶Determine whether the host is configured to send authentication traps.
Returns: | True if traps are enabled, otherwise False |
---|---|
Return type: | bool |
CLI Example:
salt '*' win_snmp.get_auth_traps_enabled
salt.modules.win_snmp.
get_community_names
()¶Get the current accepted SNMP community names and their permissions.
Returns: | A dictionary of community names and permissions. |
---|---|
Return type: | dict |
CLI Example:
salt '*' win_snmp.get_community_names
salt.modules.win_snmp.
get_permission_types
()¶Get the permission types that can be configured for communities.
Returns: | A list of permission types. |
---|---|
Return type: | list |
CLI Example:
salt '*' win_snmp.get_permission_types
salt.modules.win_snmp.
set_agent_settings
(contact=None, location=None, services=None)¶Manage the SNMP sysContact, sysLocation, and sysServices settings.
Parameters: |
|
---|---|
Returns: | True if successful, otherwise False |
Return type: | bool |
CLI Example:
salt '*' win_snmp.set_agent_settings contact='Contact Name' location='Place' services="['Physical']"
salt.modules.win_snmp.
set_auth_traps_enabled
(status=True)¶Manage the sending of authentication traps.
Parameters: | status (bool) – True to enable traps. False to disable. |
---|---|
Returns: | True if successful, otherwise False |
Return type: | bool |
CLI Example:
salt '*' win_snmp.set_auth_traps_enabled status='True'
salt.modules.win_snmp.
set_community_names
(communities)¶Manage the SNMP accepted community names and their permissions.
Parameters: | communities (dict) – A dictionary of SNMP community names and
permissions. The possible permissions can be found via
win_snmp.get_permission_types . |
---|---|
Returns: | True if successful, otherwise False |
Return type: | bool |
CLI Example:
salt '*' win_snmp.set_community_names communities="{'TestCommunity': 'Read Only'}'