Icinga / icingaweb2

A lightweight and extensible web interface to keep an eye on your environment. Analyse problems and act on them.
https://icinga.com/get-started/
GNU General Public License v2.0
808 stars 282 forks source link

Ignore script errors/warnings in plugin output #3574

Closed bunghi closed 5 years ago

bunghi commented 6 years ago

Expected Behavior

Don't show erros in the plugin output, only the result. The same like running script.sh 1>/dev/null 2>&1 (or some log file).

Current Behavior

Sometimes the script returns errors or warnings and they are shown in the plugin output. Is there anyway to ignore them or log them somewhere else?

image

Your Environment

Copyright (c) 2012-2018 Icinga Development Team (https://www.icinga.com/) License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl2.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Application information: Installation root: /usr Sysconf directory: /etc Run directory: /run Local state directory: /var Package data directory: /usr/share/icinga2 State path: /var/lib/icinga2/icinga2.state Modified attributes path: /var/lib/icinga2/modified-attributes.conf Objects path: /var/cache/icinga2/icinga2.debug Vars path: /var/cache/icinga2/icinga2.vars PID path: /run/icinga2/icinga2.pid

System information: Platform: Debian GNU/Linux Platform version: 9 (stretch) Kernel: Linux Kernel version: 4.9.0-8-amd64 Architecture: x86_64

Build information: Compiler: GNU 6.3.0 Build host: 83e7f59f33f0


* Operating System and version:

* Enabled features (`icinga2 feature list`):

Disabled features: command compatlog debuglog elasticsearch gelf graphite icingastatus influxdb livestatus notification opentsdb perfdata statusdata syslog Enabled features: api checker mainlog


* Config validation (`icinga2 daemon -C`):

[2018-09-10 10:20:58 +0200] information/cli: Icinga application loader (version: r2.9.1-1) [2018-09-10 10:20:58 +0200] information/cli: Loading configuration file(s). [2018-09-10 10:20:58 +0200] information/ConfigItem: Committing config item(s). [2018-09-10 10:20:58 +0200] warning/ApiListener: Attribute 'key_path' for object 'api' of type 'ApiListener' is deprecated and should not be used. [2018-09-10 10:20:58 +0200] warning/ApiListener: Attribute 'ca_path' for object 'api' of type 'ApiListener' is deprecated and should not be used. [2018-09-10 10:20:58 +0200] warning/ApiListener: Attribute 'cert_path' for object 'api' of type 'ApiListener' is deprecated and should not be used. [2018-09-10 10:20:58 +0200] warning/ApiListener: Please read the upgrading documentation for v2.8: https://www.icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/ [2018-09-10 10:20:58 +0200] information/ApiListener: My API identity: mqde01icinga2wk01.marquardt.de [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'TSM_CN02' (in /var/lib/icinga2/api/zones/director-global/director/dependency_apply.conf: 1:0-1:37) for type 'Dependency' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'satellite-host' (in /var/lib/icinga2/api/zones/global/_etc/satellite.conf: 29:1-29:41) for type 'Dependency' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'test' (in /var/lib/icinga2/api/zones/MQDE01/director/service_apply.conf: 1:0-1:19) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'Cluster Zone MQDE01' (in /var/lib/icinga2/api/zones/MQDE01/director/service_apply.conf: 9:1-9:35) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'ORA_redo-io-traffic_secon_SID' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 425:1-425:45) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'generic-service-15m-24x7' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 1411:1-1411:40) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'TSM_Tapes_COPY_POOL_LTO5' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 1873:1-1873:40) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'TSM_Tapes_TAPE_POOL_LTO5' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 1897:1-1897:40) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'TSM_VEBACKUP_TSMVE_MQCN01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 1945:1-1945:41) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'TSM_VEBACKUP_TSMVE_MQCH01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 1961:1-1961:41) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'TSM_VEBACKUP_TSMVE_MQIN01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 1977:1-1977:41) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'TSM_VEBACKUP_TSMVE_MQMK01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 1985:1-1985:41) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'TSM_VEBACKUP_TSMVE_MQMX01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 1993:1-1993:41) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'TSM_VEBACKUP_TSMVE_MQRO01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 2001:1-2001:41) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'TSM_VEBACKUP_TSMVE_MQTN01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 2009:1-2009:41) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'TSM_VEBACKUP_TSMVE_MQUS01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 2017:1-2017:41) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'TSM_VEBACKUP_TSMVE_MQUS02' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 2025:1-2025:41) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'WIN_Disk_Space_X' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 2041:1-2041:32) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'AIX_FS_ucbackup' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 2445:1-2445:31) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'ESX_VMFS_ALL_mqro01svc-vmfs' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3286:1-3286:43) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'ESX_VMFS_ALL_mqtn01vmfs' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3297:1-3297:39) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'ESX_VMFS_ALL_mqcn01svc01_vmfs' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3308:1-3308:45) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'ESX_VMFS_ALL_vmfs-big' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3319:1-3319:37) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'ESX_VMFS_ALL_mqmx01vmfs' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3330:1-3330:39) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'ESX_VMFS_ALL_mqmk01vmfs' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3341:1-3341:39) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'ESX_VMFS_ALL_mqin01vmfs' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3351:1-3351:39) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'ESX_VMFS_ALL_mqus01svc-vmfs' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3362:1-3362:43) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'PRINTER_Consumables' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3382:1-3382:35) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'OPEN_IF_TN01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3474:1-3474:28) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'OPEN_IF_CN01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3482:1-3482:28) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'OPEN_IF_FR01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3490:1-3490:28) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'OPEN_IF_IN02' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3498:1-3498:28) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'OPEN_IF_MK01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3506:1-3506:28) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'OPEN_IF_MX01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3514:1-3514:28) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'OPEN_IF_US02' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3522:1-3522:28) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'OPEN_IF_US01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3530:1-3530:28) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'OPEN_IF_CH01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3538:1-3538:28) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'OPEN_IF_RO01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3546:1-3546:28) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'OPEN_IF_IN01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3570:1-3570:28) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'PRINTER_Maintenance_Kit' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3626:1-3626:39) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'AC_Return_Humidity' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3682:1-3682:34) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'AC_Supply_Air_Temperature' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3690:1-3690:41) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'AC_System_Status' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3698:1-3698:32) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'AC_System_Operating_State' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3706:1-3706:41) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'AC_Return_Air_Temperature' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3714:1-3714:41) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'Cluster_HA' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3858:1-3858:26) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'APP_Proc_AgilePLM_Fileservice' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3922:1-3922:45) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'APP_Proc_AgilePLM_Portmapper' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3930:1-3930:44) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'APP_Proc_Oracle_WebLogic_NodeManager' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3938:1-3938:52) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'APP_Agile_7103' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 3970:1-3970:30) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'SAP_Interface_VTL_Emergency_Control' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 5058:1-5058:51) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'APP_Service_Flexlm_CAM350' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 6097:1-6097:41) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'APP_Service_Flexlm_MentorGraphics' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 6105:1-6105:49) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'APP_Ping_to_mqro01trcadm01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 6209:1-6209:42) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'APP_Ping_to_mqro01trcap01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 6217:1-6217:41) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'APP_Ping_to_mqro01trcap02' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 6225:1-6225:41) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'Storwize_VDisk_Mirror_Status' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 6441:1-6441:44) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'TSM_VEBACKUP_TSMVE_MQFR01' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 6664:1-6664:41) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'WIN_Disk_Space_V' (in /var/lib/icinga2/api/zones/director-global/director/service_apply.conf: 6870:1-6870:32) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] warning/ApplyRule: Apply rule 'ping6' (in /var/lib/icinga2/api/zones/global/_etc/services.conf: 34:1-34:21) for type 'Service' does not match anywhere! [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 19296 Services. [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 24 ServiceGroups. [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 231 HostGroups. [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 1 FileLogger. [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 7 NotificationCommands. [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 1 IcingaApplication. [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 860 Hosts. [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 1 ApiListener. [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 70 Downtimes. [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 71 Comments. [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 1 CheckerComponent. [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 4 Zones. [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 4 Endpoints. [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 1 ApiUser. [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 57 UserGroups. [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 281 CheckCommands. [2018-09-10 10:21:04 +0200] information/ConfigItem: Instantiated 3 TimePeriods. [2018-09-10 10:21:04 +0200] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars' [2018-09-10 10:21:04 +0200] information/cli: Finished validating the configuration file(s).


* If you run multiple Icinga 2 instances, the `zones.conf` file (or `icinga2 object list --type Endpoint` and `icinga2 object list --type Zone`) from all affected nodes.

Object 'mqcn01icinga2wk01.marquardt.de' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 58:1-58:48

Object 'mqcn02icinga2wk01.marquardt.de' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 131:1-131:48

Object 'mqde01icinga2cl01.marquardt.de' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 6:1-6:48

Object 'mqde01icinga2cl02.marquardt.de' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 10:1-10:48

Object 'mqde01icinga2wk01.marquardt.de' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 29:1-29:48

Object 'mqde01icinga2wk02.marquardt.de' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 34:1-34:48

Object 'mqfr01icinga2wk01.marquardt.de' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 110:1-110:48

Object 'mqin01icinga2wk01.marquardt.de' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 121:1-121:48

Object 'mqmk01icinga2wk01.marquardt.de' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 79:1-79:48

Object 'mqmx01icinga2wk01.marquardt.de' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 68:1-68:48

Object 'mqro01icinga2wk01.marquardt.de' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 47:1-47:48

Object 'mqtn01icinga2wk01.marquardt.de' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 141:1-141:48

Object 'mqus01icinga2wk01.marquardt.de' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 89:1-89:48

Object 'mqus02icinga2wk01.marquardt.de' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 100:1-100:48

Object 'MQCN02' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 135:1-135:20

Object 'MQDE01' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 40:1-40:20

Object 'MQFR01' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 114:1-114:20

Object 'MQIN01' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 125:1-125:20

Object 'MQMK01' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 83:1-83:20

Object 'MQMX01' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 72:1-72:20

Object 'MQRO01' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 51:1-51:20

Object 'MQTN01' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 145:1-145:20

Object 'MQUS01' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 93:1-93:20

Object 'MQUS02' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 104:1-104:20

Object 'director-global' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 24:1-24:29

Object 'global' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 20:1-20:20

Object 'master' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 15:1-15:20

lippserd commented 5 years ago

Hi,

Thanks for the report. No, you don't have that option. Everything the plugin returns is collected by Icinga and written into the database. The webinterface just displays that value.

Best, Eric