---
- job:
    name: Failure_Passive_Check
    display-name: Failure_Passive_Check
    project-type: freestyle
    description: "This job should be used to send a passive check to Icinga with a FAILED
      status. As such this should only be used as a triggered build for a FAILED (or unstable)       condition."
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - shell: |
          IPADDRESS=$(facter ipaddress)
          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 failure'
        - choice:
            name: NSCA_CODE
            description: 'Type of alert to trigger. 1=warning, 2=critical, 3=unknown.'
            # Choices are listed out of order so that 2 (critical) is the default
            choices:
                - '2'
                - '1'
                - '3'

---
- job:
    name: Failure_Passive_Check
    display-name: Failure_Passive_Check
    project-type: freestyle
    description: "This job should be used to send a passive check to Icinga with a FAILED
      status. As such this should only be used as a triggered build for a FAILED (or unstable)       condition."
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - shell: |
          IPADDRESS=$(facter ipaddress_eth0)
          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 failure'
        - choice:
            name: NSCA_CODE
            description: 'Type of alert to trigger. 1=warning, 2=critical, 3=unknown.'
            # Choices are listed out of order so that 2 (critical) is the default
            choices:
                - '2'
                - '1'
                - '3'

Change the failure passive check Jenkins job to use ipaddress_eth0
Change the failure passive check Jenkins job to use ipaddress_eth0

To match the success passive check job, as there can be problems with
the ipaddress fact when using Docker on the machine.
