Skip to content

check_nut not handling errors from upsc command #1

@arekm

Description

@arekm

Not sure if you are maintaining these scripts.

check_nut has a problem when upc driver isn't connected to anything. It incorrectly reports critical instead of unknown state with proper error message.

Example:

# upsc apc-big
Error: Driver not connected
# echo $?
1
# ./check_nut.pl apc-big -w 60 -c 30 -t 40 -T 48 -l 40 -L 60
apc-big CRITICAL: Battery Charge! apc-big WARNING: Status 0 Battery 0%,0s,0V; Input 0V,0Hz|Battery_Charge=0%;60;30 Battery_Runtime=0s;300:;180: Battery_Voltage=0V;12:;11: Input_Voltage=0V;110:130;100:140 Input_Frequency=0Hz;59.8:60.2;59.5:60.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions