Cluster members’ domain names mismatch-juniper-junos
Indeni will identify when two devices are part of a cluster and alert if the domain setting is different.
Review the settings of each device in the cluster and ensure they are the same.
How does this work?
This script logs into the Juniper JUNOS-based device using SSH and retrieves the relevant output of the “show configuration system domain-name” command.
Why is this important?
Capture the domain of the device. This is used for inventory purposes.
Without Indeni how would you find this?
It is possible to poll this data through SNMP.
name: junos-show-configuration-domain-name description: Retrieve the domain-name in the configuration type: monitoring monitoring_interval: 60 minute requires: vendor: juniper os.name: junos comments: domain: why: | Capture the domain of the device. This is used for inventory purposes. how: | This script logs into the Juniper JUNOS-based device using SSH and retrieves the relevant output of the "show configuration system domain-name" command. without-indeni: | It is possible to poll this data through SNMP. can-with-snmp: true can-with-syslog: false steps: - run: type: SSH command: show configuration system domain-name parse: type: AWK file: show-configuration-domain-name.parser.1.awk
// Deprecation warning : Scala template-based rules are deprecated. Please use YAML format rules instead. package com.indeni.server.rules.library.templatebased.crossvendor import com.indeni.server.rules.RuleContext import com.indeni.server.rules.library.templates.SnapshotComparisonTemplateRule import com.indeni.server.rules.RemediationStepCondition /** * */ case class cross_vendor_compare_domain() extends SnapshotComparisonTemplateRule( ruleName = "cross_vendor_compare_domain", ruleFriendlyName = "Clustered Devices: Cluster members' domain names mismatch", ruleDescription = "Indeni will identify when two devices are part of a cluster and alert if the domain setting is different.", metricName = "domain", isArray = false, alertDescription = "The members of a cluster of devices must have the same domain settings.", baseRemediationText = "Review the settings of each device in the cluster and ensure they are the same.")( RemediationStepCondition.VENDOR_CISCO -> """| |1. Use the "ip domain-name" NX-OS command to configure the same domain name for the clustered devices |2. Use the vrf context command in case that is needed to enter to the VRF context mode to configure the domain for a particular VRF. |3. For more information please review the following CISCO Configuration guide: |https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus5000/sw/command/reference/sysmgmt/n5k-sysmgmt-cr/n5k-sm_cmds_i.html#pgfId-1659356 """.stripMargin )