---
- job:
    name: Success_Passive_Check
    display-name: Success_Passive_Check
    project-type: freestyle
    description: "This job should be used to send a passive check to Icinga with a SUCCESS
      status. As such this should only be used as a triggered build for a stable (or related)
      condition."
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - shell: |
          IPADDRESS=$(facter ipaddress)
          NSCA_CODE=0
          printf "$IPADDRESS\t$NSCA_CHECK_DESCRIPTION\t$NSCA_CODE\t$NSCA_OUTPUT\n" | /usr/sbin/send_nsca -H <%= @alert_hostname %> >/dev/null
    wrappers:
        - ansicolor:
            colormap: xterm
    parameters:
        - string:
            name: NSCA_CHECK_DESCRIPTION
            description: 'Descriptive name of job triggering this alert'
        - string:
            name: NSCA_OUTPUT
            description: 'Description for the condition of the success'

---
- job:
    name: Success_Passive_Check
    display-name: Success_Passive_Check
    project-type: freestyle
    description: "This job should be used to send a passive check to Icinga with a SUCCESS
      status. As such this should only be used as a triggered build for a stable (or related)
      condition."
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - shell: |
          IPADDRESS=$(facter ipaddress_eth0)
          NSCA_CODE=0
          printf "$IPADDRESS\t$NSCA_CHECK_DESCRIPTION\t$NSCA_CODE\t$NSCA_OUTPUT\n" | /usr/sbin/send_nsca -H <%= @alert_hostname %> >/dev/null
    wrappers:
        - ansicolor:
            colormap: xterm
    parameters:
        - string:
            name: NSCA_CHECK_DESCRIPTION
            description: 'Descriptive name of job triggering this alert'
        - string:
            name: NSCA_OUTPUT
            description: 'Description for the condition of the success'

Use facter ipaddress_eth0 instead of ipaddress
Use facter ipaddress_eth0 instead of ipaddress

ipaddress is a bad choice here because it might guess wrong when
picking an interface, the result we really want is for eth0.
