community.network.netscaler_lb_monitor – Manage load balancing monitors
Note
This plugin is part of the community.network collection (version 3.0.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.netscaler_lb_monitor
.
Synopsis
Manage load balancing monitors.
This module is intended to run either on the ansible control node or a bastion (jumpserver) with access to the actual netscaler instance.
Requirements
The below requirements are needed on the host that executes this module.
nitro python sdk
Parameters
Parameter |
Comments |
---|---|
List of Acct-Application-Id attribute value pairs (AVPs) for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. A maximum of eight of these AVPs are supported in a monitoring message. Minimum value = Maximum value = |
|
Action to perform when the response to an inline monitor (a monitor of type Available settings function as follows:
Choices:
|
|
Number of consecutive probe failures after which the appliance generates an SNMP trap called monProbeFailed. Minimum value = Maximum value = |
|
Name of the application used to determine the state of the service. Applicable to monitors of type Minimum length = 1 |
|
Attribute to evaluate when the LDAP server responds to the query. Success or failure of the monitoring probe depends on whether the attribute exists in the response. Optional. Minimum length = 1 |
|
List of Auth-Application-Id attribute value pairs (AVPs) for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. A maximum of eight of these AVPs are supported in a monitoring CER message. Minimum value = Maximum value = |
|
The base distinguished name of the LDAP service, from where the LDAP server can begin the search for the attributes in the monitoring query. Required for Minimum length = 1 |
|
The distinguished name with which an LDAP monitor can perform the Bind operation on the LDAP server. Optional. Applicable to Minimum length = 1 |
|
Custom header string to include in the monitoring probes. |
|
Name of the database to connect to during authentication. Minimum length = 1 |
|
IP address of the service to which to send probes. If the parameter is set to 0, the IP address of the server to which the monitor is bound is considered the destination IP address. |
|
TCP or UDP port to which to send the probe. If the parameter is set to 0, the port number of the service to which the monitor is bound is considered the destination port. For a monitor of type |
|
Time value added to the learned average response time in dynamic response time monitoring (DRTM). When a deviation is specified, the appliance learns the average response time of bound services and adds the deviation to the average. The final value is then continually adjusted to accommodate response time variations over time. Specified in milliseconds, seconds, or minutes. Minimum value = Maximum value = |
|
IP address of the dispatcher to which to send the probe. |
|
Port number on which the dispatcher listens for the monitoring probe. |
|
Domain in which the XenDesktop Desktop Delivery Controller (DDC) servers or Web Interface servers are present. Required by |
|
Time duration for which to wait before probing a service that has been marked as DOWN. Expressed in milliseconds, seconds, or minutes. Minimum value = Maximum value = |
|
Default syntax expression that evaluates the database server’s response to a MYSQL-ECV or MSSQL-ECV monitoring query. Must produce a Boolean result. The result determines the state of the server. If the expression returns TRUE, the probe succeeds. For example, if you want the appliance to evaluate the error message to determine the state of the server, use the rule |
|
Number of retries that must fail, out of the number specified for the Retries parameter, for a service to be marked as DOWN. For example, if the Retries parameter is set to 10 and the Failure Retries parameter is set to 6, out of the ten probes sent, at least six probes must fail if the service is to be marked as DOWN. The default value of 0 means that all the retries must fail if the service is to be marked as DOWN. Minimum value = Maximum value = |
|
Name of a file on the FTP server. The appliance monitors the FTP service by periodically checking the existence of the file on the server. Applicable to Minimum length = 1 |
|
Filter criteria for the LDAP query. Optional. Minimum length = 1 |
|
Firmware-Revision value for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. |
|
Name of a newsgroup available on the NNTP service that is to be monitored. The appliance periodically generates an NNTP query for the name of the newsgroup and evaluates the response. If the newsgroup is found on the server, the service is marked as UP. If the newsgroup does not exist or if the search fails, the service is marked as DOWN. Applicable to NNTP monitors. Minimum length = 1 |
|
Host-IP-Address value for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. If Host-IP-Address is not specified, the appliance inserts the mapped IP (MIP) address or subnet IP (SNIP) address from which the CER request (the monitoring probe) is sent. Minimum length = 1 |
|
Hostname in the FQDN format (Example: Minimum length = 1 |
|
HTTP request to send to the server (for example, |
|
Inband-Security-Id for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. Choices:
|
|
Time interval between two successive probes. Must be greater than the value of Response Time-out. Minimum value = Maximum value = |
|
Set of IP addresses expected in the monitoring response from the DNS server, if the record type is A or AAAA. Applicable to Minimum length = 1 |
|
Send the monitoring probe to the service through an IP tunnel. A destination IP address must be specified. Choices:
|
|
KCD Account used by Minimum length = 1 Maximum length = 32 |
|
Version number of the Citrix Advanced Access Control Logon Agent. Required by the |
|
Name of the logon point that is configured for the Citrix Access Gateway Advanced Access Control software. Required if you want to monitor the associated login page or Logon Agent. Applicable to |
|
Calculate the least response times for bound services. If this parameter is not enabled, the appliance does not learn the response times of the bound services. Also used for LRTM load balancing. Choices:
|
|
Maximum number of hops that the SIP request used for monitoring can traverse to reach the server. Applicable only to monitors of type Minimum value = Maximum value = |
|
Metric table to which to bind metrics. Minimum length = 1 Maximum length = 99 |
|
Name for the monitor. Must begin with an ASCII alphanumeric or underscore Minimum length = 1 |
|
Version of MSSQL server that is to be monitored. Choices:
|
|
Name of the network profile. Minimum length = 1 Maximum length = 127 |
|
The password with which to authenticate to the netscaler node. |
|
Which protocol to use when accessing the nitro API objects. Choices:
|
|
Time in seconds until a timeout error is thrown when establishing a new session with Netscaler Default: 310 |
|
The username with which to authenticate to the netscaler node. |
|
The ip address of the netscaler appliance where the nitro API calls will be made. The port can be specified with the colon (:). E.g. 192.168.1.1:555. |
|
Name of the service identifier that is used to connect to the Oracle database during authentication. Minimum length = 1 |
|
Origin-Host value for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. Minimum length = 1 |
|
Origin-Realm value for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. Minimum length = 1 |
|
Password that is required for logging on to the Minimum length = 1 |
|
Product-Name value for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. Minimum length = 1 |
|
Domain name to resolve as part of monitoring the DNS service (for example, |
|
Type of DNS record for which to send monitoring queries. Set to Choices:
|
|
Account Session ID to be used in Account Request Packet. Applicable to monitors of type Minimum length = 1 |
|
Account Type to be used in Account Request Packet. Applicable to monitors of type Minimum value = 0 Maximum value = 15 |
|
Called Station Id to be used in Account Request Packet. Applicable to monitors of type Minimum length = 1 |
|
Source ip with which the packet will go out . Applicable to monitors of type |
|
Authentication key (shared secret text string) for RADIUS clients and servers to exchange. Applicable to monitors of type Minimum length = 1 |
|
Calling Stations Id to be used in Account Request Packet. Applicable to monitors of type Minimum length = 1 |
|
NAS-Identifier to send in the Access-Request packet. Applicable to monitors of type Minimum length = 1 |
|
Network Access Server (NAS) IP address to use as the source IP address when monitoring a RADIUS server. Applicable to monitors of type |
|
String expected from the server for the service to be marked as UP. Applicable to |
|
Response codes for which to mark the service as UP. For any other response code, the action performed depends on the monitor type. |
|
Amount of time for which the appliance must wait before it marks a probe as FAILED. Must be less than the value specified for the Interval parameter. Note: For Minimum value = Maximum value = |
|
Response time threshold, specified as a percentage of the Response Time-out parameter. If the response to a monitor probe has not arrived when the threshold is reached, the appliance generates an SNMP trap called monRespTimeoutAboveThresh. After the response time returns to a value below the threshold, the appliance generates a monRespTimeoutBelowThresh SNMP trap. For the traps to be generated, the “MONITOR-RTO-THRESHOLD” alarm must also be enabled. Minimum value = Maximum value = |
|
Maximum number of probes to send to establish the state of a service for which a monitoring probe failed. Minimum value = Maximum value = |
|
Mark a service as DOWN, instead of UP, when probe criteria are satisfied, and as UP instead of DOWN when probe criteria are not satisfied. Choices:
|
|
RTSP request to send to the server (for example, |
|
If The module will not save the configuration on the netscaler node if it made no changes. Choices:
|
|
String of arguments for the script. The string is copied verbatim into the request. |
|
Path and name of the script to execute. The script must be available on the NetScaler appliance, in the /nsconfig/monitors/ directory. Minimum length = 1 |
|
Secondary password that users might have to provide to log on to the Access Gateway server. Applicable to |
|
Use a secure SSL connection when monitoring a service. Applicable only to TCP based monitors. The secure option cannot be used with a Choices:
|
|
String to send to the service. Applicable to |
|
SIP method to use for the query. Applicable only to monitors of type Choices:
|
|
SIP user to be registered. Applicable only if the monitor is of type Minimum length = 1 |
|
SIP URI string to send to the service (for example, Minimum length = 1 |
|
URL of the logon page. For monitors of type Minimum length = 1 |
|
Community name for Minimum length = 1 |
|
SNMP OID for Minimum length = 1 |
|
Threshold for Minimum length = 1 |
|
SNMP version to be used for Choices:
|
|
SQL query for a Minimum length = 1 |
|
State of the monitor. The Choices:
Default: “present” |
|
Store the database list populated with the responses to monitor probes. Used in database specific load balancing if Choices:
|
|
Enable/Disable probing for Account Service. Applicable only to Store Front monitors. For multi-tenancy configuration users my skip account service. Choices:
|
|
This option will enable monitoring of services running on storefront server. Storefront services are monitored by probing to a Windows service that runs on the Storefront server and exposes details of which storefront services are running. Choices:
|
|
Store Name. For monitors of type Minimum length = 1 |
|
Number of consecutive successful probes required to transition a service’s state from DOWN to UP. Minimum value = Maximum value = |
|
List of Supported-Vendor-Id attribute value pairs (AVPs) for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. A maximum eight of these AVPs are supported in a monitoring message. Minimum value = Maximum value = |
|
Probe the service by encoding the destination IP address in the IP TOS (6) bits. Choices:
|
|
The TOS ID of the specified destination IP. Applicable only when the TOS parameter is set. Minimum value = Maximum value = |
|
The monitor is bound to a transparent device such as a firewall or router. The state of a transparent device depends on the responsiveness of the services behind it. If a transparent device is being monitored, a destination IP address must be specified. The probe is sent to the specified IP address by using the MAC address of the transparent device. Choices:
|
|
Code expected when the server is under maintenance. |
|
String expected from the server for the service to be marked as trofs. Applicable to HTTP-ECV/TCP-ECV monitors. |
|
Type of monitor that you want to create. Choices:
|
|
Unit of measurement for the Deviation parameter. Cannot be changed after the monitor is created. Choices:
|
|
Unit of measurement for the Down Time parameter. Cannot be changed after the monitor is created. Choices:
|
|
monitor interval units. Choices:
|
|
monitor response timeout units. Choices:
|
|
User name with which to probe the Minimum length = 1 |
|
If Choices:
|
|
Validate the credentials of the Xen Desktop DDC server user. Applicable to monitors of type Choices:
|
|
Vendor-Id value for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. |
|
List of Vendor-Specific-Acct-Application-Id attribute value pairs (AVPs) to use for monitoring Diameter servers. A maximum of eight of these AVPs are supported in a monitoring message. The specified value is combined with the value of vendorSpecificVendorId to obtain the Vendor-Specific-Application-Id AVP in the CER monitoring message. Minimum value = Maximum value = |
|
List of Vendor-Specific-Auth-Application-Id attribute value pairs (AVPs) for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. A maximum of eight of these AVPs are supported in a monitoring message. The specified value is combined with the value of vendorSpecificVendorId to obtain the Vendor-Specific-Application-Id AVP in the CER monitoring message. Minimum value = Maximum value = |
|
Vendor-Id to use in the Vendor-Specific-Application-Id grouped attribute-value pair (AVP) in the monitoring CER message. To specify Auth-Application-Id or Acct-Application-Id in Vendor-Specific-Application-Id, use vendorSpecificAuthApplicationIds or vendorSpecificAcctApplicationIds, respectively. Only one Vendor-Id is supported for all the Vendor-Specific-Application-Id AVPs in a CER monitoring message. Minimum value = 1 |
Notes
Note
For more information on using Ansible to manage Citrix NetScaler Network devices see https://www.ansible.com/ansible-netscaler.
Examples
- name: Set lb monitor
local_action:
nsip: 172.18.0.2
nitro_user: nsroot
nitro_pass: nsroot
validate_certs: no
module: netscaler_lb_monitor
state: present
monitorname: monitor_1
type: HTTP-INLINE
action: DOWN
respcode: ['400']
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
List of differences between the actual configured object and the configuration specified in the module Returned: failure Sample: {“targetlbvserver”: “difference. ours: (str) server1 other: (str) server2”} |
|
list of logged messages by the module Returned: always Sample: [“message 1”, “message 2”] |
|
Message detailing the failure reason Returned: failure Sample: “Action does not exist” |
Authors
George Nikolopoulos (@giorgos-nikolopoulos)