Auto Discovery
Introduction
Purpose
The SIPMON Auto Discovery module automatically detects and adds new hosts within the SIPMON platform. It leverages discovery providers included in Monitoring Connectors, enabling seamless identification and creation of newly discovered network elements.
Scope
This document will comprehensively cover the key functionalities of the modules, delving into their design principles, main components, data flow, and more to provide a thorough understanding.
Audience
The intended audience for the document includes both developers and stakeholders who are interested in an in-depth analysis.
System Overview
Context
This module will enhance SIPMON monitoring by enabling the discovery of a wider range of devices through various methods and providers. It provides the flexibility to automate actions based on the discovered devices, thereby improving network management and integration.
Dependencies
The modules do not require additional dependencies as they operate independently. However, the discovery method or technique may necessitate specific tools. For instance, if a user opts to scan devices via SNMP using the SNMP provider, tools such as nmap and snmpwalk must be installed on the system. Rest assured, the system will handle these installations automatically during the setup process.
Module Architecture
- Architecture Diagram
Figure: Architecture Diagram of Auto Discovery Module
Design Principles
- Modularity: Each component of the module is designed to perform a specific function, ensuring that the system is easy to understand, develop, and maintain.
- Scalability: The architecture supports scaling to handle an increasing number of discovery providers without significant reconfiguration.
- Flexibility: The design includes a system hook-in method that facilitates meeting various requirements, allowing for different discovery methods to be integrated as part of the system.
- Robustness: Implementing error reporting and easy to debug procedures to ensure the module can operate reliably under different conditions.
- Reusability: Code is written in a way that encourages reuse of components and functionalities across different parts of the system.
- Separation of Concerns: Different concerns of the module (e.g., data retrieval, processing, and storage) are separated into distinct layers to simplify management and enhance clarity.
- Dependency Injection: Utilizing dependency injection to manage component dependencies, enabling easier testing and integration.
Components
- Discovery Job Manager: Oversees the discovery process and delegates control to the discovery providers, allowing them to operate as integral parts of the system.
- Discovery Provider: Implements specific methods for discovering devices using different protocols (e.g., SNMP, IP Phone, ESXI).
- Discovery Results: Maintains a record of all discovered devices, including their attributes and statuses relative to their providers.
- Configuration Manager: Manages the settings and parameters used by the discovery process, including provider configurations.
- API Layer: Provides an interface for front-end systems to interact with the Auto Discovery module, such as adding a discovery job or querying discovered devices.
- Logging Module: Collects and stores logs related to the discovery process, useful for debugging and auditing.
Implementation Details
Technical Specifications
Backend:
- Programming Language: PHP
- Framework: Symfony
- Libraries:
- Pimple for containers
- Monolog for logging
- Symfony Console for CLI commands
Front-end:
- Programming Language: Type script
- Framework: React
- Libraries:
- Axios for HTTP requests
- Jotai for state management
- React Router for routing
- Material-UI for UI components
Discovery Providers:
- Specific libraries and tools may vary based on the discovery method:
- SNMP:
nmap,snmpwalk - IP Phone: will heavily depends on
cucm API - ESXI:
VMwarevSphere Management SDK
- SNMP:
- Specific libraries and tools may vary based on the discovery method:
Configuration
Minimal to zero configuration is required for the module, though it may vary depending on the discovery provider chosen by the end-user.
Key Functions
- Extensible Provider Support: Includes built-in support for SNMP/SNMP3 and IP Phone discovery providers, with the option to integrate custom providers for expanded capabilities.
- Scheduled Discovery: Allows scheduling of discovery jobs at specific times or intervals. Supports immediate execution and varies based on provider capabilities.
- Parallel Processing: Enables independent operation of each discovery provider to minimize conflicts and ensure efficient parallel processing.
- Automated Policy Application: Supports both manual and automated application of policies to discovered devices.
- Comprehensive Error Handling: Logs errors encountered during the discovery process at various stages, facilitating effective debugging and auditing.
- Configuration Profiling: Allows scan configurations to be profiled and reused for profiling supported providers.
- Troubleshooting: Includes a built-in troubleshooter that allows the user to
ping,traceroute, and performSNMP walkfor identified IP addresses. - Extensible Mapper: Automatically assigns discovered devices to
host templates,host groups, andcontact groupsbased on discovered device parameters.
Installation and Setup
Prerequisites
The host system should have:
Gitversion 2 or higher,Node.jsversion 18.x or higher,Composer2.0 or higher installed. All other prerequisites for the module will be handled during the installation process.
Installation Steps
For detailed installation instructions, please refer to the developer documentation available here. Follow this resource to enable the module within your system.
Usage
TODO
API Documentation Endpoints, request, and response formats.
Please find the comprehensive guideline here for operating the module here, which includes step-by-step instructions, information to ensure smooth and efficient operation. This guide is essential for both new users and experienced administrators to fully leverage the capabilities of the Auto Discovery module.
TODO
User Interface Description of any UI components
Testing
Test Strategy
An effective test strategy is crucial to ensure that the SIPMON Auto Discovery module functions correctly under various conditions, meets the requirements, and operates efficiently. The following are the key components of our test strategy:
Unit Testing:
- Purpose: Validate the functionality of individual components in isolation.
- Tools: PEST for backend tests, Jest for frontend tests.
- Scope:
- Backend: Test individual classes and methods in the PHP code.specially the Provider classes will be tested in depth
- Frontend: Test React components and utility functions.
- Coverage: Aim for high code coverage, targeting at least 80%.
Integration Testing:
- Purpose: Ensure that different components of the system work together as expected.
- Tools: PHPUnit, Behat for backend; React Testing Library for frontend.
- Scope:
- Backend: Test interactions between various Symfony components.
- Frontend: Test how React components interact with each other and the backend APIs.
- Coverage: Focus on high-priority workflows and critical interactions.
End-to-End (E2E) Testing:
- Purpose: Validate the complete system workflow, from the front-end user interface to the backend processing to the final outcome.
- Tools: Cypress.
- Scope: Simulate user interactions with the application, and verify their outcomes through the UI.
- Coverage: Ensure core functionalities such as discovery job creation, device management, and configuration updates work seamlessly.
Maintenance and Support
Logging and Monitoring:
- Use tools like monolog for incident logging and monitoring of the discovery scans and general errors/exceptions.
- Implement structured and detailed logging to facilitate quick diagnosis and resolution of issues.
Troubleshooting:
TODO
Contact Information:
TODO
Security Considerations
Authentication and Authorization
TODO
Describe how the module handles authentication and authorization.
Data Protection
TODO
Measures taken to protect data (e.g., encryption).
Compliance
TODO
Any compliance requirements (e.g., GDPR).