Defined Type: netops::ripeatlas

Defined in:
modules/netops/manifests/ripeatlas.pp

Overview

Parameters:

  • ipv4 (Optional[Tuple[String,1]]) (defaults to: undef)
  • ipv6 (Optional[Tuple[String,1]]) (defaults to: undef)
  • loss_allow (Integer[0,100]) (defaults to: 50)
  • ipv4_failures (Integer) (defaults to: 35)
  • ipv6_failures (Integer) (defaults to: 90)
  • group (Any) (defaults to: 'network')


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'modules/netops/manifests/ripeatlas.pp', line 23

define netops::ripeatlas(
    Optional[Tuple[String,1]] $ipv4=undef,
    Optional[Tuple[String,1]] $ipv6=undef,
    Integer[0,100] $loss_allow=50,
    Integer $ipv4_failures=35,
    Integer $ipv6_failures=90,
    $group='network',
) {
    $notes_url = monitoring::build_notes_url(
      'https://wikitech.wikimedia.org/wiki/Network_monitoring#Atlas_alerts',
      ['https://grafana.wikimedia.org/d/K1qm1j-Wz/ripe-atlas'])

    if $ipv4 {
        monitoring::service { "atlas-ping-${title}-ipv4":
            description    => "IPv4 ping to ${title}",
            check_command  => "check_ripe_atlas!${ipv4[0]}!${loss_allow}!${ipv4_failures}",
            host           => "ripe-atlas-${title}",
            group          => $group,
            check_interval => 5,
            notes_url      => $notes_url,
        }
    }

    if $ipv6 {
        monitoring::service { "atlas-ping-${title}-ipv6":
            description    => "IPv6 ping to ${title}",
            check_command  => "check_ripe_atlas!${ipv6[0]}!${loss_allow}!${ipv6_failures}",
            host           => "ripe-atlas-${title} IPv6",
            group          => $group,
            check_interval => 5,
            notes_url      => $notes_url,
        }
    }
}