SevOne SDN Collector Filter Alerts Using 'launch generate-fault-config' Option
About
This document provides a description of the generate-fault-config option available from the launch script. This option has been added to the launch script to make it easier for SevOne Cisco ACI users to generate fault configuration JSON file from input fault configuration .xlsx or .xls file. You may specify fault filters and severity mapping in .xls or .xlsx file which are then converted into JSON file that can be used by the collector.
Input .xls / .xlsx file Format
aci_severity, fault_code, granular, and severity_mapping sheets provide the following.
Location: /opt/cisco-aci-agent/conf/fault_config.xlsx
aci_severity
This sheet is used to provide attributes of a fault to filter on.
code: Contains ACI severities to create SevOne NMS alerts on.
- Sheet name must be aci_severity
- First row of every column must be a header. For example, aci_severity
fault_code
This sheet is used to provide attributes of a fault to filter on.
code: Contains fault codes to create SevOne NMS Alerts on. To learn more about the fault codes, please refer to https://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/all/syslog/guide/b_ACI_System_Messages_Guide.html
- Sheet name must be fault_code
- First row of every column must be a header. For example, code
granular
This sheet is used to provide attributes of a fault to filter on.
code: Contains fault codes to create SevOne NMS Alerts on. To learn more about the fault codes, please refer to https://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/all/syslog/guide/b_ACI_System_Messages_Guide.html
aci_severity: ACI severities that the faults with the above-mentioned fault codes need to be mapped to.
- Sheet name must be granular
- First row of every column must be a header. For example, code, aci_severity
severity_mapping
This sheet is used if the severity of faults with certain codes needs to be mapped to a particular SevOne NMS severity.
code: Contains fault codes mapped to the severity mentioned in severity.
severity: SevOne NMS severity that the faults with the above-mentioned fault codes need to be mapped to. Accepted keywords are emergency, alert, critical, error, warning, notice, info, or debug.
- Sheet name must be severity_mapping
- First row of every column must be a header. For example, severity, code
Launch generate-fault-config
Execute the generate-fault-config
$ launch generate-fault-config --conf-path <.xls or .xlsx file> --input-file <.xls or .xlsx filename> --output-file <.json filename>
- --conf-path and --input-file options are kept separate in case multiple fault configuration files are under the same path for multiple sites.
- --conf-path, --input-file, and --output-file options are optional.
- --conf-path - path to the folder containing the fault configuration .xls or .xlsx file.
- --input-file - name of the input fault configuration .xls or xlsx filename.
- --output-file - name of the output fault configuration .json filename.
- If no folder path is provided, the launch script defaults to /opt/cisco-aci-agent/conf for the input fault configuration file.
- If a valid directory path is provided, the launch script uses the provided path for the input fault configuration file.
- If a non-existent directory path is provided, the launch script defaults to /opt/cisco-aci-agent/conf.
- If no input file is provided, the launch script defaults to input file, fault_config.xlsx.
- If an input file is provided, the launch script uses the provided input file.
- If a non-existent or invalid or corrupt input file is provided, the launch script exits without generating a fault configuration file.
- If no output file is provided, the launch script defaults to fault_config.json.
- If an output file is provided, the launch script generates the output file with the provided name. However, if an output file with the provided name already exists, the file is overwritten.
- Stop 'generate-fault-config' while in progress
- Ctrl-C command can be used to stop execution of the generate-fault-config command. The program exits immediately.
- Input file not found
- If the input file is not found, the execution results in an error and program exits immediately.
INPUT FILE NOT FOUND '<INPUT_FILE_NAME'>
- Unsupported format or Corrupted file
- If the input file is malformed or is an unsupported .xls or .xlsx document, the execution
results in an error and program exits immediately.
UNSUPPORTED FORMAT, OR CORRUPT INPUT FILE
- 'aci_severity' sheet does not exist
- If the aci_severity sheet does not exist in the input file, the execution results in an
error and program exits immediately.
'ACI_SEVERITY' SHEET DOES NOT EXIST IN INPUT FILE '<INPUT_FILE_NAME'>
- 'fault_code' sheet does not exist
- If the fault_code sheet does not exist in the input file, the execution results in an
error and program exits immediately.
'FAULT_CODE' SHEET DOES NOT EXIST IN INPUT FILE '< INPUT_FILE_NAME >'
- 'granular' sheet does not exist
- If the granular sheet does not exist in the input file, the execution results in an error
and program exits immediately.
'GRANULAR' SHEET DOES NOT EXIST IN INPUT FILE '< INPUT_FILE_NAME >'
- 'severity_mapping' sheet does not exist
- If the severity_mapping sheet does not exist in the input file, the execution results in
an error and program exits immediately.
'SEVERITY_MAPPING' SHEET DOES NOT EXIST IN INPUT FILE '< INPUT_FILE_NAME >'
- Invalid format of 'aci_severity'
- If the aci_severity sheet contains an invalid format of the fault configuration, the
execution results in an error and program exits immediately.
CAN NOT PROCESS 'ACI_SEVERITY' SHEET DUE TO INVALID FORMAT
- Invalid format of 'fault_code'
- If the fault_code sheet contains an invalid format of the fault configuration, the
execution results in an error and program exits immediately.
CAN NOT PROCESS 'FAULT_CODE' SHEET DUE TO INVALID FORMAT
- Invalid format of 'granular'
- If the granular sheet contains an invalid format of the fault configuration, the
execution results in an error and program exits immediately.
CAN NOT PROCESS 'GRANULAR' SHEET DUE TO INVALID FORMAT
- Invalid format of 'severity_mapping'
- If the severity_mapping sheet contains an invalid format of the fault configuration, the
execution results in an error and program exits immediately.
CAN NOT PROCESS 'SEVERITY_MAPPING' SHEET DUE TO INVALID FORMAT