LarsMichelsen / nagios_downtime

Script based downtime scheduling for Nagios / Icinga

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Script exists on linux with error-code 1 und error message, though the GET request was successful

schmalenegger opened this issue · comments

Hi,

we are using check_mk and this script for our linux servers.
It works from check_mk's point of view - scheduled downtime is succesfully submitted, but i receive a general error message ("Some undefined error occured, turn debug mode on to view what happened."
The exit-code of the script is 1 - should be 0

Here's the debug output (anonymized):

Debug: HTTP-GET: http://monitoring.xxx.yyy:80/sysmonit/check_mk/view.py?output_format=json&_transid=-1&_do_confirm=yes&_do_actions=yes&&_username=Peter&_secret=paulandmary&view_name=hoststatus&host=server0815&_down_comment=Perl Downtime-Script (ID:1482415663)&_down_from_now=yes&_down_minutes=10
Debug: HTTP-Response: HINWEIS: Erfolgreich 1 Befehle gesendet.
[
[
  "sitealias",
  "host",
  "host_parents",
  "host_childs",
  "host_addresses",
  "alias",
  "host_icons",
  "host_state",
  "host_plugin_output",
  "host_pnpgraph",
  "host_perf_data",
  "host_in_downtime",
  "host_in_notifper",
  "num_services",
  "num_services_ok",
  "num_services_warn",
  "num_services_crit",
  "num_services_unknown",
  "num_services_pending",
  "host_attempt",
  "host_notification_number",
  "host_state_age",
  "host_check_age",
  "host_next_check",
  "host_next_notification",
  "host_last_notification",
  "host_check_latency",
  "host_check_duration",
  "host_check_interval",
  "host_notifper",
  "host_contact_groups",
  "host_contacts",
  "host_group_memberlist",
  "host_servicelevel",
  "host_check_command",
  "host_custom_vars",
  "host_custom_notes"
],
[
  "Local site sysmonit",
  "server0815",
  "",
  "",
  "1.2.3.4",
  "server0815",
  "menu",
  "UP",
  "Packet received via smart PING",
  "",
  "",
  "nein",
  "ja",
  "20",
  "20",
  "0",
  "0",
  "0",
  "0",
  "1/3",
  "0",
  "2016-10-18 08:16:42",
  "0 sec",
  "in 38 sec",
  "2016-10-18 08:16:42",
  "-",
  "0.000 sec",
  "0.000 sec",
  "60s/6s",
  "24X7",
  "all, Linux",
  "Peter, Chantalle, Chayenne",
  "SQL-Server, Linux",
  "",
  "check-mk-host-smart",
  "",
  ""
]
]

commented

It's just that the user you use for authentication has the German language configured in the GUI. The script needs to parse the result messages of the GUI and does not understand the German result message. Changing the language should solve the issue.