Manages RPM/SLA probes on the network device.
codeauthor: | Mircea Ulinic <mircea@cloudflare.com> & Jerome Fleury <jf@cloudflare.com> |
---|---|
maturity: | new |
depends: | napalm |
platform: | linux |
salt.modules.napalm_probes.
config
()¶Returns the configuration of the RPM probes.
Returns: | A dictionary containing the configuration of the RPM/SLA probes. |
---|
CLI Example:
salt '*' probes.config
Output Example:
{
'probe1':{
'test1': {
'probe_type' : 'icmp-ping',
'target' : '192.168.0.1',
'source' : '192.168.0.2',
'probe_count' : 13,
'test_interval': 3
},
'test2': {
'probe_type' : 'http-ping',
'target' : '172.17.17.1',
'source' : '192.17.17.2',
'probe_count' : 5,
'test_interval': 60
}
}
}
salt.modules.napalm_probes.
delete_probes
(probes)¶Removes RPM/SLA probes from the network device. Calls the configuration template 'delete_probes' from the NAPALM library, providing as input a rich formatted dictionary with the configuration details of the probes to be removed from the configuration of the device.
Parameters: | probes -- Dictionary with a similar format as the output dictionary of the function config(), |
---|
where the details are not necessary. :return: Will return if the configuration of the device was updated.
Input example:
probes = {
'existing_probe':{
'existing_test1': {},
'existing_test2': {}
}
}
salt.modules.napalm_probes.
results
()¶Provides the results of the measurements of the RPM/SLA probes.
:return a dictionary with the results of the probes.
CLI Example:
salt '*' probes.results
Output example:
{
'probe1': {
'test1': {
'last_test_min_delay' : 63.120,
'global_test_min_delay' : 62.912,
'current_test_avg_delay': 63.190,
'global_test_max_delay' : 177.349,
'current_test_max_delay': 63.302,
'global_test_avg_delay' : 63.802,
'last_test_avg_delay' : 63.438,
'last_test_max_delay' : 65.356,
'probe_type' : 'icmp-ping',
'rtt' : 63.138,
'last_test_loss' : 0,
'round_trip_jitter' : -59.0,
'target' : '192.168.0.1',
'source' : '192.168.0.2'
'probe_count' : 15,
'current_test_min_delay': 63.138
},
'test2': {
'last_test_min_delay' : 176.384,
'global_test_min_delay' : 169.226,
'current_test_avg_delay': 177.098,
'global_test_max_delay' : 292.628,
'current_test_max_delay': 180.055,
'global_test_avg_delay' : 177.959,
'last_test_avg_delay' : 177.178,
'last_test_max_delay' : 184.671,
'probe_type' : 'icmp-ping',
'rtt' : 176.449,
'last_test_loss' : 0,
'round_trip_jitter' : -34.0,
'target' : '172.17.17.1',
'source' : '172.17.17.2'
'probe_count' : 15,
'current_test_min_delay': 176.402
}
}
}
salt.modules.napalm_probes.
schedule_probes
(probes)¶Will schedule the probes. On Cisco devices, it is not enough to define the probes, it is also necessary to schedule them. This method calls the configuration template 'schedule_probes' from the NAPALM library, providing as input a rich formatted dictionary with the names of the probes and the tests to be scheduled.
Parameters: | probes -- Dictionary with a similar format as the output dictionary of the function config(), |
---|
where the details are not necessary. :return: Will return if the configuration of the device was updated.
Input example:
probes = {
'new_probe':{
'new_test1': {},
'new_test2': {}
}
}
salt.modules.napalm_probes.
set_probes
(probes)¶Configures RPM/SLA probes on the device. Calls the configuration template 'set_probes' from the NAPALM library, providing as input a rich formatted dictionary with the configuration details of the probes to be configured.
Parameters: | probes -- Dictionary formatted as the output of the function config(): |
---|---|
Returns: | Will return if the configuration of the device was updated. |
Input example:
probes = {
'new_probe':{
'new_test1': {
'probe_type' : 'icmp-ping',
'target' : '192.168.0.1',
'source' : '192.168.0.2',
'probe_count' : 13,
'test_interval': 3
},
'new_test2': {
'probe_type' : 'http-ping',
'target' : '172.17.17.1',
'source' : '192.17.17.2',
'probe_count' : 5,
'test_interval': 60
}
}
}
set_probes(probes)