Random Project

Update Needed for Curl

After migrating to RHEL9 the MTR Integration broke when Nagios tried to send an SMS notification and I needed to modify /usr/local/nagiosxi/html/includes/components/mtr/mtr.inc.php and changed CURLOPT_GET to CURLOPT_HTTPGET (there was only 1 instance) to fix it.

Error in eventman.log
PHP Fatal error: Uncaught Error: Undefined constant “CURLOPT_GET” in /usr/local/nagiosxi/html/includes/components/mtr/mtr.inc.php:781
Stack trace:
#0 /usr/local/nagiosxi/html/includes/components/mtr/mtr.inc.php(703): mtr_component_send_sms()
#1 /usr/local/nagiosxi/html/includes/components/mtr/mtr.inc.php(542): mtr_component_handle_notification_event()
#2 /usr/local/nagiosxi/html/includes/utilsl.inc.php(0): mtr_component_eventhandler()
#3 /usr/local/nagiosxi/cron/eventman.php(171): do_callbacks()
#4 /usr/local/nagiosxi/cron/eventman.php(133): process_event()
#5 /usr/local/nagiosxi/cron/eventman.php(110): process_event_record()
#6 /usr/local/nagiosxi/cron/eventman.php(59): process_events()
#7 /usr/local/nagiosxi/cron/eventman.php(22): do_eventman_jobs()
#8 {main}
thrown in /usr/local/nagiosxi/html/includes/components/mtr/mtr.inc.php on line 781