# salt.states.probes

## Network Probes

Configure RPM (JunOS)/SLA (Cisco) probes on the device via NAPALM proxy.

codeauthor:

  Mircea Ulinic <ping@mirceaulinic.net> & Jerome Fleury <jf@cloudflare.com>

maturity:

  new

depends:

  napalm

platform:

  unix

### Dependencies

- `napalm probes management module`

Added in version 2016.11.0.

salt.states.probes.managed(name, probes, defaults=None)

  Ensure the networks device is configured as specified in the state SLS file. Probes not specified will be removed, while probes not confiured as expected will trigger config updates.

  Parameters:

    - probes -- Defines the probes as expected to be configured on the device. In order to ease the configuration and avoid repeating the same parameters for each probe, the next parameter (defaults) can be used, providing common characteristics.

    - defaults -- Specifies common parameters for the probes.

  SLS Example:

      rpmprobes:
          probes.managed:
              - probes:
                  probe_name1:
                      probe1_test1:
                          source: 192.168.0.2
                          target: 192.168.0.1
                      probe1_test2:
                          target: 172.17.17.1
                      probe1_test3:
                          target: 8.8.8.8
                          probe_type: http-ping
                  probe_name2:
                      probe2_test1:
                          test_interval: 100
              - defaults:
                  target: 10.10.10.10
                  probe_count: 15
                  test_interval: 3
                  probe_type: icmp-ping

  In the probes configuration, the only mandatory attribute is target (specified either in probes configuration, either in the defaults dictionary). All the other parameters will use the operating system defaults, if not provided:

  - `source` - Specifies the source IP Address to be used during the tests. If not specified will use the IP Address of the logical interface loopback0.

  - `target` - Destination IP Address.

  - `probe_count` - Total number of probes per test (1..15). System defaults: 1 on both JunOS & Cisco.

  - `probe_interval` - Delay between tests (0..86400 seconds). System defaults: 3 on JunOS, 5 on Cisco.

  - `probe_type` - Probe request type. Available options:

    - icmp-ping

    - tcp-ping

    - udp-ping

  Using the example configuration above, after running the state, on the device will be configured 4 probes, with the following properties:

      probe_name1:
          probe1_test1:
              source: 192.168.0.2
              target: 192.168.0.1
              probe_count: 15
              test_interval: 3
              probe_type: icmp-ping
          probe1_test2:
              target: 172.17.17.1
              probe_count: 15
              test_interval: 3
              probe_type: icmp-ping
          probe1_test3:
              target: 8.8.8.8
              probe_count: 15
              test_interval: 3
              probe_type: http-ping
      probe_name2:
          probe2_test1:
              target: 10.10.10.10
              probe_count: 15
              test_interval: 3
              probe_type: icmp-ping