File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
server/lib/classes/cron.d Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -315,6 +315,29 @@ public function onRunJob() {
315315 }
316316 }
317317
318+ /*
319+ * SAS2IRCU
320+ */
321+ system ('which sas2ircu ' , $ retval );
322+ if ($ retval === 0 ) {
323+ $ state = 'ok ' ;
324+ $ data ['output ' ] = shell_exec ('sas2ircu 0 DISPLAY ' );
325+ if (is_array ($ data ['output ' ])) {
326+ foreach ($ data ['output ' ] as $ item ) {
327+ if (strpos ($ item , 'Optimal (OPT) ' ) !== false ) {
328+ $ this ->_tools ->_setState ($ state , 'ok ' );
329+ } else {
330+ $ this ->_tools ->_setState ($ state , 'critical ' );
331+ }
332+ if (strpos ($ item , 'Okay (OKY) ' ) !== false ) {
333+ $ this ->_tools ->_setState ($ state , 'ok ' );
334+ } else {
335+ $ this ->_tools ->_setState ($ state , 'critical ' );
336+ }
337+ }
338+ }
339+ }
340+
318341 $ res = array ();
319342 $ res ['server_id ' ] = $ server_id ;
320343 $ res ['type ' ] = $ type ;
You can’t perform that action at this time.
0 commit comments