Skip to content
Aleksejs Petrovs edited this page Jan 11, 2019 · 6 revisions

Welcome to the sophos-config-zabbix wiki!

User macro list:

  • {$T_SOPHOS_API_PASSWORD} - #your user password
  • {$T_SOPHOS_API_USER} - # your admin username
  • {$T_SOPHOS_HISTORY_DATA} - # for how long to store the history* data
  • {$T_SOPHOS_HISTORY_MASTER} - # for how long to keep master item data. Configured to 1h for proper debugging, but during the prodcution rollout better to have this configured to 0
  • {$T_SOPHOS_KEEP_LOST_PERIOD} - # for how long to keep the non-discovered resources
  • {$T_SOPHOS_PORT} - # Sophos Web GUI TCP port. Usually 4444
  • {$T_SOPHOS_TRENDS_DATA} - # For how long to keep trends* table data
  • {$T_SOPHOS_UPDATE_INTERVAL_DISCOVERY} - #How often to run LLD rule. Configured to 5 minutes for test purposes. For production it's better not to have this < 1h
  • {$T_SOPHOS_UPDATE_INTERVAL_MASTER} - # How often to poll the API by master item. Configured to 5 minutes

Script sophos.py

This is a python script to perform the general API call and convert it to the valid JSON format. It's designed to be quite universal for all of the Sophos API methods that are following the /objects/method/call notation.

Example: call: # python sophos.py 'sph-dev' '4444' 'admin' 'zabbix' 'time' 'recurring'

API link: https://sph-dev:4444/api/objects/time/recurring/

{"data":[ { "{#COMMENT}":"", "{#_TYPE}":"time/recurring", "{#NAME}":"Work hours", "{#START_TIME}":"08:00:00", "{#WEEKDAYS}":"[u'Mon', u'Tue', u'Wed', u'Thu', u'Fri']", "{#_LOCKED}":"", "{#END_TIME}":"17:00:00", "{#_REF}":"REF_DefaultTimeEventWork" }, { "{#COMMENT}":"", "{#_TYPE}":"time/recurring", "{#NAME}":"Lunch", "{#START_TIME}":"12:00:00", "{#WEEKDAYS}":"[u'Mon', u'Tue', u'Wed', u'Thu', u'Fri', u'Sat', u'Sun']", "{#_LOCKED}":"", "{#END_TIME}":"13:00:00", "{#_REF}":"REF_DefaultTimeEventLunch" }, { "{#COMMENT}":"", "{#_TYPE}":"time/recurring", "{#NAME}":"Time to install updates", "{#START_TIME}":"21:00:00", "{#WEEKDAYS}":"[u'Mon', u'Tue', u'Wed', u'Thu', u'Fri', u'Sat', u'Sun']", "{#_LOCKED}":"", "{#END_TIME}":"23:00:00", "{#_REF}":"REF_DefaultTimeEventAutoinstall" }, { "{#COMMENT}":"", "{#_TYPE}":"time/recurring", "{#NAME}":"Weekend", "{#START_TIME}":"00:00:00", "{#WEEKDAYS}":"[u'Sat', u'Sun']", "{#_LOCKED}":"", "{#END_TIME}":"23:59:00", "{#_REF}":"REF_DefaultTimeEventWeekend" } ]}

Clone this wiki locally
You can’t perform that action at this time.