Skip to content

NagiosXI component that allows users to visualize high-priority host and service objects using ServiceNow impact/urgency calculation

Notifications You must be signed in to change notification settings

SNapier/xi-component-priorityobjects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Priority Objects Component

Overview

The Priority Objects component for Nagios XI allows users to visualize high-priority hosts and services based on ServiceNow's impact/urgency calculation. Priority is calculated using a standard ServiceNow matrix (1-4 scale) from custom variables set on hosts and services.

This component fills a critical gap in Nagios XI by providing a dedicated view for high-priority objects, making it easier for administrators, engineers, and executives to focus on what matters most.

Features

  • ServiceNow Priority Calculation: Calculates priority from impact/urgency custom variables
  • ServiceNow Compatibility: Uses standard ServiceNow priority matrix (1-4 scale)
  • Flexible Filtering: Filter by object type, priority level, and display options
  • Performance Optimized: Handles large datasets with pagination and max result limits
  • Nested Services: Group services under their parent hosts (optional)
  • Sortable Tables: Sort by priority, type, name, host, or status
  • Attempt Field: Shows current attempt/max attempts (e.g., "1/3") to distinguish hard vs soft states
  • Quick Actions: Direct links to host and service detail,timeline and perfdata pages
  • Performance Graphs: Internal functions to graph performance data within the component using Highcharts.
  • State History: Visual timeline of state changes with soft/hard state filtering
  • Priority Display: Priority indicators (P1, P2, P3, P4) with colored dots and detailed hover tooltips
  • Quick Configuration: Direct link to component configuration

Requirements

  • Nagios XI 5.6.0 or later
  • PHP 7.0 or later
  • Access to Nagios XI includes directory

Installation

Step 1: Clone the Repository

Clone the repository to a temporary location on your Nagios XI server:

cd /tmp
git clone https://github.com/SNapier/xi-component-priorityobjects.git

Or download the latest release as a ZIP file from the releases page and extract it.

Step 2: Create Component Directory

Create the component directory in Nagios XI:

mkdir -p /usr/local/nagiosxi/html/includes/components/priorityobjects

Step 3: Copy Files

Copy all files from the cloned repository to the component directory:

cp -r /tmp/xi-component-priorityobjects/* /usr/local/nagiosxi/html/includes/components/priorityobjects/

Or if you extracted a ZIP file:

cp -r /path/to/xi-component-priorityobjects/* /usr/local/nagiosxi/html/includes/components/priorityobjects/

Step 4: Set Proper Permissions

Set the correct ownership and permissions for the component files:

chown -R nagios:nagios /usr/local/nagiosxi/html/includes/components/priorityobjects
chmod -R 755 /usr/local/nagiosxi/html/includes/components/priorityobjects

Important: The web server user (typically nagios) must have read access to all files in the component directory.

Step 5: Verify Installation

  1. Navigate to Admin > System Extensions > Components in Nagios XI
  2. The Priority Objects component should appear in the list
  3. Click Configure to set up your custom variable names and options

Troubleshooting

Component Not Appearing in Components List

If the component doesn't appear in the Components list:

  1. Check File Permissions:

    ls -la /usr/local/nagiosxi/html/includes/components/priorityobjects/

    All files should be readable by the web server user.

  2. Check PHP Errors:

    tail -f /usr/local/nagiosxi/var/log/php_errors.log

    Look for any errors related to priorityobjects.inc.php.

  3. Verify File Structure: Ensure priorityobjects.inc.php exists in the component directory:

    ls -la /usr/local/nagiosxi/html/includes/components/priorityobjects/priorityobjects.inc.php
  4. Check Nagios XI Logs:

    tail -f /usr/local/nagiosxi/var/log/nagiosxi.log
  5. Fix Permissions (if needed):

    chown -R nagios:nagios /usr/local/nagiosxi/html/includes/components/priorityobjects
    chmod -R 755 /usr/local/nagiosxi/html/includes/components/priorityobjects
    find /usr/local/nagiosxi/html/includes/components/priorityobjects -type f -exec chmod 644 {} \;
    find /usr/local/nagiosxi/html/includes/components/priorityobjects -type d -exec chmod 755 {} \;
  6. Clear Browser Cache: Sometimes a hard refresh (Ctrl+F5) is needed after installation.

Permission Denied Errors

If you see permission errors:

  1. Ensure the web server user owns the files:

    chown -R nagios:nagios /usr/local/nagiosxi/html/includes/components/priorityobjects
  2. Ensure directories are executable:

    find /usr/local/nagiosxi/html/includes/components/priorityobjects -type d -exec chmod 755 {} \;
  3. Ensure files are readable:

    find /usr/local/nagiosxi/html/includes/components/priorityobjects -type f -exec chmod 644 {} \;

Configuration

Impact/Urgency Custom Variables

The component calculates priority using ServiceNow's impact/urgency matrix from custom variables:

  • Configure custom variable names (default: _impact and _urgency)
  • Set impact and urgency values (1-4) as custom variables on hosts/services
  • Priority is calculated using ServiceNow matrix:
    • Priority 1 (Critical): Impact 1 + Urgency 1
    • Priority 2 (High): Impact 1 + Urgency 2, or Impact 2 + Urgency 1
    • Priority 3 (Medium): Impact 2 + Urgency 2, or Impact 3 + Urgency 1, or Impact 1 + Urgency 3
    • Priority 4 (Low): All other combinations

Setting Custom Variables

In Core Configuration Manager (CCM):

  1. Navigate to Core Configuration Manager > Hosts/Services
  2. Select your config
  3. Choose a host or service
  4. Go to Custom Variables section
  5. Add custom variables:
    • _impact (or your custom name): Value 1-4
    • _urgency (or your custom name): Value 1-4

Template Inheritance:

Custom variables can be set in templates and will properly inherit to all hosts/services using that template, making it easy to configure priority for groups of related objects.

Usage

Accessing the Component

  1. Navigate to Home menu in Nagios XI
  2. Click Details section to expand it
  3. Click Priority Objects in the Details section
  4. The component will load and display priority objects based on your configuration

Filtering Options

  • Object Type: Show hosts only, services only, or both
  • Priority Filter: Select which priority levels to display (1-4)
  • Show Nested Services: Group services under their parent hosts
  • Collapsible Filters: Click "Filter Options" header to collapse/expand filter controls (state persists across page reloads)

Table Features

  • Sortable Columns: Click column headers to sort
  • Priority Badges: Color-coded badges (1=Red, 2=Orange, 3=Yellow, 4=Green)
  • Status Indicators: Standard Nagios XI status colors and icons
  • Action Links: Quick access to host/service detail pages
  • Performance Graphs: Click the graph icon in the Actions column to view performance data in a modal
  • Pagination: Navigate through large result sets

Performance Graphs

The component includes a self-contained performance graph viewer that displays RRD data directly in a modal window:

  • Self-Contained: Uses custom graph template, no dependencies on other components
  • Direct RRD Access: Uses utils-graphs.inc.php (fetch_rrd()) for direct performance data retrieval
  • Highcharts Integration: Full Highcharts functionality including zoom, export, and tooltips
  • Host and Service Support: Works for both host and service performance data
  • URL-Encoded Names: Properly handles service names with spaces
  • Error Handling: Gracefully displays message when no performance data is available

State History Viewer

The component includes a state history viewer that displays a visual timeline of state changes for hosts and services:

  • Timeline Visualization: Interactive Gantt chart showing state changes over time with colored blocks
  • 12-Hour Lookback: Default 12-hour lookback period for optimal performance (configurable)
  • Soft/Hard State Filtering: Toggle to show/hide soft states and hard states independently
  • Visual Distinction: Soft states appear with reduced opacity, hard states are solid
  • Detailed Tooltips: Hover over timeline blocks to see detailed information including:
    • State type (OK, WARNING, CRITICAL, etc.)
    • Start and end times
    • Duration of each state
    • Check attempt information
    • Status output text
  • Access: Click the state history icon in the Actions column to open the modal
  • Host and Service Support: Works for both host and service state history
  • Interactive Features: Zoom, pan, and export capabilities via Highcharts

Priority Matrix Reference

ServiceNow Impact/Urgency Matrix

Impact\Urgency 1 (Critical) 2 (High) 3 (Medium) 4 (Low)
1 (Critical) Priority 1 Priority 2 Priority 3 Priority 4
2 (High) Priority 2 Priority 3 Priority 3 Priority 4
3 (Medium) Priority 3 Priority 3 Priority 4 Priority 4
4 (Low) Priority 4 Priority 4 Priority 4 Priority 4

Performance Considerations

  • Max Results: Default limit of 500 objects (configurable up to 5000)
  • Pagination: Default 50 records per page (configurable: 10, 25, 50, 100, 200)
  • Caching: Priority calculations are cached for performance
  • Lazy Loading: Data loads via AJAX to prevent page blocking
  • Auto-Refresh: Configurable auto-refresh interval (default: 30 seconds) preserves scroll position during updates

Troubleshooting

No Objects Displayed

  1. Check that objects have impact and urgency custom variables configured
  2. Verify custom variable names match your configuration
  3. Ensure custom variable values are set to 1-4
  4. Check minimum priority filter setting
  5. Ensure objects meet the priority threshold

Performance Issues

  1. Reduce max results limit
  2. Use more specific filters
  3. Increase pagination page size
  4. Check Nagios XI backend performance

Custom Variables Not Found

  1. Verify custom variable names in component configuration
  2. Check that custom variables are set on objects (not just templates)
  3. Ensure custom variable values are numeric (1-4)
  4. Check object permissions

Support

For issues, questions, or feature requests, please contact:

  • Author: SNapier
  • Company: NRDS

License

Copyright (c) 2025 NRDS. All rights reserved.

Version History

See CHANGELOG.txt for detailed version history.

About

NagiosXI component that allows users to visualize high-priority host and service objects using ServiceNow impact/urgency calculation

Resources

Stars

Watchers

Forks

Packages

No packages published