Timezone mismatch across cluster members-checkpoint-gaia,ipso

Timezone mismatch across cluster members-checkpoint-gaia,ipso
0

Timezone mismatch across cluster members-checkpoint-gaia,ipso

Vendor: checkpoint

OS: gaia,ipso

Description:
Indeni will identify when two devices are part of a cluster and alert if the timezone setting is different.

Remediation Steps:
Review the settings of each device in the cluster and ensure they are the same.

How does this work?
Parse the Gaia/IPSO configuration database in /config/active and retreive the currently configured time zone. It is also possible to list it using clish, but that generates a large amount of logs in /var/log/messages when done repeatedly.

Why is this important?
A correct time and time zone is very important for many reasons. An incorrectly configured time zone could mean that timestamps on logs are incorrect.

Without Indeni how would you find this?
An administrator could login and manually run the command.

chkp-clish-show-timezone

name: chkp-clish-show-timezone
description: records the timezone for the device
type: monitoring
monitoring_interval: 60 minutes
requires:
    vendor: checkpoint
    or:
    -   os.name: gaia
    -   os.name: ipso
comments:
    timezone:
        why: |
            A correct time and time zone is very important for many reasons. An incorrectly configured time zone could mean that timestamps on logs are incorrect.
        how: |
            Parse the Gaia/IPSO configuration database in /config/active and retreive the currently configured time zone. It is also possible to list it using clish, but that generates a large amount of logs in /var/log/messages when done repeatedly.
        without-indeni: |
            An administrator could login and manually run the command.
        can-with-snmp: false
        can-with-syslog: false
        vendor-provided-management: Listing the time zone only available from the
            command line interface and WebUI.
steps:
-   run:
        type: SSH
        command: ${nice-path} -n 15 grep "timezone" /config/active
    parse:
        type: AWK
        file: show-timezone.parser.1.awk

cross_vendor_compare_timezone

// 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_timezone() extends SnapshotComparisonTemplateRule(
  ruleName = "cross_vendor_compare_timezone",
  ruleFriendlyName = "Clustered Devices: Timezone mismatch across cluster members",
  ruleDescription = "Indeni will identify when two devices are part of a cluster and alert if the timezone setting is different.",
  metricName = "timezone",
  isArray = false,
  alertDescription = "The members of a cluster of devices must have the same timezone settings.",
  baseRemediationText = """Review the settings of each device in the cluster and ensure they are the same.""")(
  RemediationStepCondition.VENDOR_CISCO ->
    """|
      |1. Execute the show clock command to check the system time for both peer switches
      |2. Review the time-zone setting of each device in the cluster and ensure they are the same.
      |3. For more information about  NX-OS timezone configuration review the next link:
      |https://www.cisco.com/c/en/us/td/docs/switches/datacenter/sw/4_0/nx-os/fundamentals/configuration/guide2/fun_nx-os_book/fun_5sys_mgmt.html""".stripMargin
)