soliantconsulting / FileMaker-Server-Zabbix-Templates

Soliant FileMaker Server Zabbix Templates
MIT License
12 stars 9 forks source link

fmserverd on Mac can fail during backup #8

Closed jedtech-john closed 3 years ago

jedtech-john commented 3 years ago

The "FMS Process Database Engine" item sometimes reports down when it is actually running a backup. The query for "All FMS Processes" of

 system.run["ps -u fmserver -ww -o state,comm",wait]

returns the first character of the fmserverd process line as a "U" indicating it is in an "uninterruptable wait".

The preprocessing JavaScript looks for:

var pattern = "\n([D,R,S]).*fmserverd";

According to the ps man page in macOS Catalina the valid values of the first character are:

I Marks a process that is idle (sleeping for longer than about 20 seconds). R Marks a runnable process. S Marks a process that is sleeping for less than about 20 seconds. T Marks a stopped process. U Marks a process in uninterruptible wait. Z Marks a dead process (a ``zombie'').

to allow a "U" line to indicate that fmserverd is still running the script line could be changed to:

var pattern = "\n([U,R,S]).*fmserverd";
jedtech-john commented 3 years ago

The same issue also applies to "FMS Process Scripting Engine" (fmsased), "FMS Process CWP" (fmscwpc), "FMS Process Wrapper" (fmserver_helperd), "FMS Process Progressive Backups" (fmsib), and "FMS Process Data API" (fmwipd)

wimdecorte commented 3 years ago

The original has D to cover the uninterruptible wait; I'll modify the macOS template to use U, and the Linux one to keep using D

wimdecorte commented 3 years ago

verified that Big Sur still uses U, Ubuntu uses D

wimdecorte commented 3 years ago

fixed in our working copy, will be in the next release