Defined Type: netops::ripeatlas

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

Overview

Parameters:

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


22
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
# File 'modules/netops/manifests/ripeatlas.pp', line 22

define netops::ripeatlas(
    Optional[String] $ipv4=undef,
    Optional[String] $ipv6=undef,
    Integer[0,100] $loss_allow=50,
    Integer $ipv4_failures=35,
    Integer $ipv6_failures=65,
    $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}!${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}!${loss_allow}!${ipv6_failures}",
            host           => "ripe-atlas-${title} IPv6",
            group          => $group,
            check_interval => 5,
            notes_url      => $notes_url,
        }
    }
}