MKP 2.3.4. Fixed agent crash if opcache_get_status is disabled by server settings
This commit is contained in:
@@ -227,7 +227,12 @@ def doCmkOutput(data):
|
||||
print(f"NC_Database_Type;{data['ocs']['data']['server']['database']['type']}")
|
||||
print(f"NC_Database_Version;{data['ocs']['data']['server']['database']['version']}")
|
||||
print(f"NC_Database_Size;{data['ocs']['data']['server']['database']['size']}")
|
||||
print(f"NC_OPCache_Hit_Rate;{data['ocs']['data']['server']['php']['opcache']['opcache_statistics']['opcache_hit_rate']}")
|
||||
# opcache entry does not exist if opcache_get_status is disabled by server settings
|
||||
# thanks to Marcus Klein from Iteratio to report (and solve!) this bug
|
||||
if (data['ocs']['data']['server']['php']['opcache']):
|
||||
print(f"NC_OPCache_Hit_Rate;{data['ocs']['data']['server']['php']['opcache']['opcache_statistics']['opcache_hit_rate']}")
|
||||
else:
|
||||
print(f"NC_OPCache_Hit_Rate;0")
|
||||
|
||||
def doCmkOutputAllUsers(data, verify, hostname, protocol, port, folder):
|
||||
print("<<<nextcloud_users:sep(59)>>>")
|
||||
|
||||
Reference in New Issue
Block a user