Device uptime too high-f5-all
Indeni will alert when a device’s uptime is too high
Upgrade the device. You may also change the alert’s threshold, or disable the alert completely, if not needed.
How does this work?
This script uses the F5 iControl REST API to retrieve the current uptime of vCMP guests.
Why is this important?
Keeping track of vCMP guest uptimes can help trigger alerts if they are suddenly restarted due to a system failure.
Without Indeni how would you find this?
This metric is available by logging into the device with SSH, entering TMSH and executing “show vcmp guest”.
name: f5-rest-mgmt-tm-vcmp-guest-stats description: Extract status of deployed vCMP guests type: monitoring monitoring_interval: 10 minutes requires: vendor: f5 product: load-balancer rest-api: 'true' vsx: 'true' comments: vs-state: why: | Keeping track of vCMP guest states will enable alerting for when a VM has failed. how: | This script uses the F5 iControl REST API to retrieve the current status of vCMP guests. can-with-snmp: false can-with-syslog: false uptime-milliseconds: why: | Keeping track of vCMP guest uptimes can help trigger alerts if they are suddenly restarted due to a system failure. how: | This script uses the F5 iControl REST API to retrieve the current uptime of vCMP guests. can-with-snmp: false can-with-syslog: false steps: - run: type: HTTP command: /mgmt/tm/sys/clock parse: type: JSON file: rest-mgmt-tm-vcmp-guest-stats.parser.1.json.yaml - run: type: HTTP command: /mgmt/tm/vcmp/guest/stats parse: type: JSON file: rest-mgmt-tm-vcmp-guest-stats.parser.2.json.yaml
// 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.apidata.time.TimeSpan import com.indeni.apidata.time.TimeSpan.TimePeriod import com.indeni.server.rules.RuleContext import com.indeni.server.rules.library.templates.TimeIntervalThresholdOnDoubleMetricTemplateRule import com.indeni.server.sensor.models.managementprocess.alerts.dto.AlertSeverity import com.indeni.server.rules.ThresholdDirection import com.indeni.server.rules.RemediationStepCondition /** * */ case class cross_vendor_uptime_high() extends TimeIntervalThresholdOnDoubleMetricTemplateRule( ruleName = "cross_vendor_uptime_high", ruleFriendlyName = "All Devices: Device uptime too high", ruleDescription = "Indeni will alert when a device's uptime is too high", severity = AlertSeverity.ERROR, metricName = "uptime-milliseconds", metricUnits = TimePeriod.MILLISECOND, threshold = TimeSpan.fromDays(365 * 10), thresholdDirection = ThresholdDirection.ABOVE, alertDescriptionFormat = "The current uptime is %.0f seconds. This alert identifies when a device has been up for a very long time and may need an upgrade.", alertDescriptionValueUnits = TimePeriod.SECOND, baseRemediationText = "Upgrade the device. You may also change the alert's threshold, or disable the alert completely, if not needed.")( RemediationStepCondition.VENDOR_CISCO -> """| |1. Use the "show version" NX-OS command to display the current system uptime. |2. Run the "show system reset-reason" to check the reason for the last reboot of the device. |3. Check if the installed NX-OS version is supported and review it for software bugs.""".stripMargin )