NTP servers configured do not match requirement-juniper-junos

NTP servers configured do not match requirement-juniper-junos
0

NTP servers configured do not match requirement-juniper-junos

Vendor: juniper

OS: junos

Description:
Indeni can verify that certain NTP servers are configured on a specific device.

Remediation Steps:
Update the configuration of the device to match the requirement.

junos-show-ntp-associations

name: junos-show-ntp-associations
description: JUNOS show NTP status
type: monitoring
monitoring_interval: 10 minute
requires:
    vendor: juniper
    os.name: junos
    product: firewall
comments:
    ntp-servers:
        why: |
            This metric shows if at least a NTP server is configured. NTP servers are used to sync the time across all hosts and network devices.
            This is critical for things such as event correlation and logging. Use Network Time Protocol (NTP) to set the date and time if possible.
            However, it is important to ensure the NTP UDP port is allowed through the firewalls on your network.
        how: |
            This script logs into the Juniper JUNOS-based device using SSH and retrieves the output of the "show ntp associations" command.
            Reference: http://nlug.ml1.co.uk/2012/01/ntpq-p-output/831
        can-with-snmp: false
        can-with-syslog: false
    ntp-server-state:
        why: |
            Even though NTP servers are configured, that does not guarantee that they work. It is important to track the actual state of the NTP server.
            Properly sync'd NTP servers are critical for things such as event correlation and logging. In addition, clock drift can lead to authentication failures and connectivity issues.
        how: |
            This script logs into the Juniper JUNOS-based device using SSH and retrieves the output of the "show ntp associations" command.
            Reference: http://nlug.ml1.co.uk/2012/01/ntpq-p-output/831
        can-with-snmp: false
        can-with-syslog: false
steps:
    -   run:
            type: SSH
            file: show-ntp-associations.remote.1.bash
        parse:
            type: AWK
            file: show-ntp-associations.parser.1.awk

crossvendor_compliance_check_ntp_servers

// Deprecation warning : Scala template-based rules are deprecated. Please use YAML format rules instead.

package com.indeni.server.rules.library.templatebased.crossvendor.compliance

import com.indeni.server.rules.RuleContext
import com.indeni.server.rules.library.templates.MultiSnapshotComplianceCheckTemplateRule
import com.indeni.server.sensor.models.managementprocess.alerts.dto.AlertSeverity

case class crossvendor_compliance_check_ntp_servers() extends MultiSnapshotComplianceCheckTemplateRule(
  ruleName = "crossvendor_compliance_check_ntp_servers",
  ruleFriendlyName = "Compliance Check: NTP servers configured do not match requirement",
  ruleDescription = "Indeni can verify that certain NTP servers are configured on a specific device.",
  severity = AlertSeverity.WARN,
  metricName = "ntp-servers",
  itemKey = "ipaddress",
  alertDescription = "The list of NTP servers configured on this device does not match the requirement. Please review the list below.",
  baseRemediationText = "Update the configuration of the device to match the requirement.",
  requiredItemsParameterName = "NTP Servers",
  requiredItemsParameterDescription = "Enter the NTP servers required, each one on its own line."
)()