dj-wasabi / ansible-zabbix-server

Installing and maintaining zabbix-server for RedHat/Debian/Ubuntu.
https://galaxy.ansible.com/dj-wasabi/zabbix-server/
MIT License
176 stars 150 forks source link

Failing for me at Configure zabbix-server #151

Closed loztagain closed 5 years ago

loztagain commented 5 years ago

Hi,

trying zabbix-server install, get the following message: (a bit long apologies)

TASK [dj-wasabi.zabbix-server : Configure zabbix-server] ** fatal: [zabbix]: FAILED! => {"changed": false, "msg": "AnsibleError: template error while templating string: no test named 'version'. String: # this is a configuration file for zabbix server process\n# to get more information about zabbix, visit http://www.zabbix.com\n\n############ general parameters #################\n### option: listenport\n#\tlisten port for trapper.\n#\nListenPort={{ zabbix_server_listenport }}\n\n### option: sourceip\n#\tsource ip address for outgoing connections.\n#\n{% if zabbix_server_sourceip is defined and zabbix_server_sourceip %}\nSourceIP={{ zabbix_server_sourceip }}\n{% endif %}\n\n{% if zabbix_version is version('3.0', '>=') %}\n### Option: LogType\n#\tSpecifies where log messages are written to:\n#\t\tsystem - syslog\n#\t\tfile - file specified with LogFile parameter\n#\t\tconsole - standard output\n#\n# Mandatory: no\n# Default:\nLogType={{ zabbix_server_logtype }}\n{% endif %}\n\n### option: logfile\n#\tname of log file.\n#\tif not set, syslog is used.\n#\nLogFile={{ zabbix_server_logfile }}\n\n### option: logfilesize\n#\tmaximum size of log file in mb.\n#\t0 - disable automatic log rotation.\n#\nLogFileSize={{ zabbix_server_logfilesize }}\n\n### option: debuglevel\n#\tspecifies debug level\n#\t0 - no debug\n#\t1 - critical information\n#\t2 - error information\n#\t3 - warnings\n#\t4 - for debugging (produces lots of information)\n#\nDebugLevel={{ zabbix_server_debuglevel }}\n\n### Option: SocketDir\n#\tIPC socket directory.\n# Directory to store IPC sockets used by internal Zabbix services.\n#\n# Mandatory: no\n# Default:\n# SocketDir=/tmp\n\n{% if zabbix_version is version('3.4', '>=') %}\nSocketDir={{ zabbix_server_socketdir }}\n{% endif %}\n\n### option: pidfile\n#\tname of pid file.\n#\nPidFile={{ zabbix_server_pidfile }}\n\n### option: dbhost\n#\tdatabase host name.\n#\tif set to localhost, socket is used for mysql.\n#\tif set to empty string, socket is used for postgresql.\n#\nDBHost={{ zabbix_server_dbhost }}\n\n### option: dbname\n#\tdatabase name.\n#\tfor sqlite3 path to database file must be provided. dbuser and dbpassword are ignored.\n#\nDBName={{ zabbix_server_dbname }}\n\n### option: dbschema\n#\tschema name. used for ibm db2.\n#\n{% if zabbix_server_dbschema is defined and zabbix_server_dbschema %}\nDBSchema={{ zabbix_server_dbschema }}\n{% endif %}\n\n### option: dbuser\n#\tdatabase user. ignored for sqlite.\n#\nDBUser={{ zabbix_server_dbuser }}\n\n### option: dbpassword\n#\tdatabase password. ignored for sqlite.\n#\tcomment this line if no password is used.\n#\nDBPassword={{ zabbix_server_dbpassword }}\n\n### option: dbsocket\n#\tpath to mysql socket.\n#\n{% if zabbix_server_dbsocket is defined and zabbix_server_dbsocket %}\nDBSocket={{ zabbix_server_dbsocket }}\n{% endif %}\n\n### option: dbport\n#\tdatabase port when not using local socket. ignored for sqlite.\n#\n{% if zabbix_server_dbport is defined and zabbix_server_dbport %}\nDBPort={{ zabbix_server_dbport }}\n{% endif %}\n\n### Option: HistoryStorageURL\n#\tHistory storage HTTP[S] URL.\n#\n# Mandatory: no\n# Default:\n{% if zabbix_server_historystorageurl is defined and zabbix_server_historystorageurl %}\nHistoryStorageURL={{ zabbix_server_historystorageurl }}\n{% endif %}\n\n{% if zabbix_version is version('3.4', '>=') %}\n### Option: HistoryStorageTypes\n#\tComma separated list of value types to be sent to the history storage.\n#\n# Mandatory: no\n# Default:\nHistoryStorageTypes={{ zabbix_server_historystoragetypes }}\n{% endif %}\n\n{% if zabbix_version is version('4.0', '>=') %}\n### Option: HistoryStorageDateIndex\n#\tEnable preprocessing of history values in history storage to store values in different indices based on date.\n#\t0 - disable\n#\t1 - enable\n#\n# Mandatory: no\n# Default:\nHistoryStorageDateIndex={{ zabbix_server_historystoragedateindex }}\n{% endif %}\n\n{% if zabbix_version is version('4.0', '>=') %}\n### Option: ExportDir\n#\tDirectory for real time export of events, history and trends in newline delimited JSON format.\n#\tIf set, enables real time export.\n#\n# Mandatory: no\n# Default:\n{% if zabbix_server_exportdir is defined and zabbix_server_exportdir %}\nExportDir={{ zabbix_server_exportdir }}\n{% endif %}\n{% endif %}\n\n{% if zabbix_version is version('4.0', '>=') %}\n### Option: ExportFileSize\n#\tMaximum size per export file in bytes.\n#\tOnly used for rotation if ExportDir is set.\n#\n# Mandatory: no\n# Range: 1M-1G\n# Default:\nExportFileSize={{ zabbix_server_exportfilesize }}\n{% endif %}\n############ advanced parameters ################\n\n### option: startpollers\n#\tnumber of pre-forked instances of pollers.\n#\nStartPollers={{ zabbix_server_startpollers }}\n\n### option: startipmipollers\n#\tnumber of pre-forked instances of ipmi pollers.\n#\nStartIPMIPollers={{ zabbix_server_startipmipollers }}\n\n### option: startpollersunreachable\n#\tnumber of pre-forked instances of pollers for unreachable hosts (including ipmi).\n#\nStartPollersUnreachable={{ zabbix_server_startpollersunreachable }}\n\n### option: starttrappers\n#\tnumber of pre-forked instances of trappers.\n#\ttrappers accept incoming connections from zabbix sender, active agents, active proxies and child nodes.\n#\tat least one trapper process must be running to display server availability in the frontend.\n#\nStartTrappers={{ zabbix_server_starttrappers }}\n\n### option: startpingers\n#\tnumber of pre-forked instances of icmp pingers.\n#\nStartPingers={{ zabbix_server_startpingers }}\n\n### option: startdiscoverers\n#\tnumber of pre-forked instances of discoverers.\n#\nStartDiscoverers={{ zabbix_server_startdiscoverers }}\n\n### option: starthttppollers\n#\tnumber of pre-forked instances of http pollers.\n#\nStartHTTPPollers={{ zabbix_server_starthttppollers }}\n\n{% if zabbix_version is version_compare('2.0', '>=') %}\n### option: starttimers\n#\tnumber of pre-forked instances of timers.\n#\ttimers process time-based trigger functions and maintenance periods.\n#\tonly the first timer process handles the maintenance periods.\n#\nStartTimers={{ zabbix_server_starttimers }}\n{% endif %}\n\n{% if zabbix_version is version_compare('3.0', '>=') %}\n### Option: StartEscalators\n# Number of pre-forked instances of escalators.\n#\nStartEscalators={{ zabbix_server_startescalators }}\n{% endif %}\n\n### option: javagateway\n#\tip address (or hostname) of zabbix java gateway.\n#\tonly required if java pollers are started.\n#\n{% if zabbix_server_javagateway is defined and zabbix_server_javagateway %}\nJavaGateway={{ zabbix_server_javagateway }}\n\n### option: javagatewayport\n#\tport that zabbix java gateway listens on.\n#\nJavaGatewayPort={{ zabbix_server_javagatewayport }}\n\n### option: startjavapollers\n#\tnumber of pre-forked instances of java pollers.\n#\nStartJavaPollers={{ zabbix_server_startjavapollers }}\n{% endif %}\n\n{% if zabbix_version is version_compare('2.2', '>=') %}\n### option: startvmwarecollectors\n#\tnumber of pre-forked vmware collector instances.\n#\nStartVMwareCollectors={{ zabbix_server_startvmwarecollectors }}\n\n### option: vmwarefrequency\n#\thow often zabbix will connect to vmware service to obtain a new data.\n#\nVMwareFrequency={{ zabbix_server_vmwarefrequency }}\n\n{% if zabbix_version is version_compare('3.0', '>=') %}\n### Option: VMwarePerfFrequency\n# How often Zabbix will connect to VMware service to obtain performance data.\n#\n# Mandatory: no\nVMwarePerfFrequency={{ zabbix_server_vmwareperffrequency }}\n{% endif %}\n\n### option: vmwarecachesize\n#\tsize of vmware cache, in bytes.\n#\tshared memory size for storing vmware data.\n#\tonly used if vmware collectors are started.\n#\nVMwareCacheSize={{ zabbix_server_vmwarecachesize }}\n{% endif %}\n\n{% if zabbix_version is version_compare('3.0', '>=') %}\n### Option: VMwareTimeout\n# Specifies how many seconds vmware collector waits for response from VMware service.\n#\nVMwareTimeout={{ zabbix_server_vmwaretimeout }}\n{% endif %}\n\n### option: snmptrapperfile\n#\ttemporary file used for passing data from snmp trap daemon to the server.\n#\tmust be the same as in zabbix_trap_receiver.pl or snmptt configuration file.\n#\nSNMPTrapperFile={{ zabbix_server_snmptrapperfile }}\n\n### option: startsnmptrapper\n#\tif 1, snmp trapper process is started.\n#\nStartSNMPTrapper={{ zabbix_server_startsnmptrapper }}\n\n### option: listenip\n#\tlist of comma delimited ip addresses that the trapper should listen on.\n#\ttrapper will listen on all network interfaces if this parameter is missing.\n#\n{% if zabbix_server_listenip is defined and zabbix_server_listenip %}\nListenIP={{ zabbix_server_listenip }}\n{% endif %}\n\n### option: housekeepingfrequency\n#\tHow often Zabbix will perform housekeeping procedure (in hours).\n#\tHousekeeping is removing outdated information from the database.\n#\tTo prevent Housekeeper from being overloaded, no more than 4 times HousekeepingFrequency\n#\thours of outdated information are deleted in one housekeeping cycle, for each item.\n#\tTo lower load on server startup housekeeping is postponed for 30 minutes after server start.\n#\tWith HousekeepingFrequency=0 the housekeeper can be only executed using the runtime control option.\n#\tIn this case the period of outdated information deleted in one housekeeping cycle is 4 times the\n#\tperiod since the last housekeeping cycle, but not less than 4 hours and not greater than 4 days.\n#\nHousekeepingFrequency={{ zabbix_server_housekeepingfrequency }}\n\n### option: maxhousekeeperdelete\n#\tThe table \"housekeeper\" contains \"tasks\" for housekeeping procedure in the format:\n#\t[housekeeperid], [tablename], [field], [value].\n#\tNo more than 'MaxHousekeeperDelete' rows (corresponding to [tablename], [field], [value])\n#\twill be deleted per one task in one housekeeping cycle.\n#\tSQLite3 does not use this parameter, deletes all corresponding rows without a limit.\n#\tIf set to 0 then no limit is used at all. In this case you must know what you are doing!\n#\nMaxHousekeeperDelete={{ zabbix_server_maxhousekeeperdelete }}\n\n{% if zabbix_version is version_compare('3.2', '<=') %}\n### option: senderfrequency\n#\thow often zabbix will try to send unsent alerts (in seconds).\n#\nSenderFrequency={{ zabbix_server_senderfrequency }}\n{% endif %}\n\n### option: cachesize\n#\tsize of configuration cache, in bytes.\n#\tshared memory size for storing host, item and trigger data.\n#\nCacheSize={{ zabbix_server_cachesize }}\n\n### option: cacheupdatefrequency\n#\thow often zabbix will perform update of configuration cache, in seconds.\n#\nCacheUpdateFrequency={{ zabbix_server_cacheupdatefrequency }}\n\n### option: startdbsyncers\n#\tnumber of pre-forked instances of db syncers\n#\nStartDBSyncers={{ zabbix_server_startdbsyncers }}\n\n### option: historycachesize\n#\tsize of history cache, in bytes.\n#\tshared memory size for storing history data.\n#\nHistoryCacheSize={{ zabbix_server_historycachesize }}\n\n{% if zabbix_version is version_compare('3.0', '>=') %}\n### Option: HistoryIndexCacheSize\n# Size of history index cache, in bytes.\n# Shared memory size for indexing history cache.\n#\nHistoryIndexCacheSize={{ zabbix_server_historyindexcachesize }}\n{% endif %}\n\n### option: trendcachesize\n#\tsize of trend cache, in bytes.\n#\tshared memory size for storing trends data.\n#\nTrendCacheSize={{ zabbix_server_trendcachesize }}\n\n{% if zabbix_version is version_compare('3.0', '<') %}\n ### option: historytextcachesize\n#\tsize of text history cache, in bytes.\n#\tshared memory size for storing character, text or log history data.\n#\nHistoryTextCacheSize={{ zabbix_server_historytextcachesize }}\n{% endif %}\n\n{% if zabbix_version is version_compare('2.2', '>=') %}\n### option: valuecachesize\n#\tsize of history value cache, in bytes.\n#\tshared memory size for caching item history data requests\n#\tsetting to 0 disables value cache.\n#\nValueCacheSize={{ zabbix_server_valuecachesize }}\n{% endif %}\n\n{% if zabbix_version is version_compare('2.4', '<') %}\n### option: nodenoevents\n#\tif set to '1' local events won't be sent to master node.\n#\tthis won't impact ability of this node to propagate events from its child nodes.\n#\nNodeNoEvents={{ zabbix_server_nodenoevents }}\n\n### option: nodenohistory\n#\tif set to '1' local history won't be sent to master node.\n#\tthis won't impact ability of this node to propagate history from its child nodes.\n#\nNodeNoHistory={{ zabbix_server_nodenohistory }}\n{% endif %}\n\n### option: timeout\n#\tspecifies how long we wait for agent, snmp device or external check (in seconds).\n#\nTimeout={{ zabbix_server_timeout }}\n\n### option: trappertimeout\n#\tspecifies how many seconds trapper may spend processing new data.\n#\nTrapperTimeout={{ zabbix_server_trappertimeout }}\n\n### option: unreachableperiod\n#\tafter how many seconds of unreachability treat a host as unavailable.\n#\nUnreachablePeriod={{ zabbix_server_unreachableperiod }}\n\n### option: unavailabledelay\n#\thow often host is checked for availability during the unavailability period, in seconds.\n#\nUnavailableDelay={{ zabbix_server_unavailabledelay }}\n\n### option: unreachabledelay\n#\thow often host is checked for availability during the unreachability period, in seconds.\n#\nUnreachableDelay={{ zabbix_server_unreachabledelay }}\n\n### option: alertscriptspath\n#\tfull path to location of custom alert scripts.\n#\tdefault depends on compilation options.\n#\nAlertScriptsPath={{ zabbix_server_alertscriptspath }}\n\n### option: externalscripts\n#\tfull path to location of external scripts.\n#\tdefault depends on compilation options.\n#\nExternalScripts={{ zabbix_server_externalscriptspath }}\n\n### option: fpinglocation\n#\tlocation of fping.\n#\tmake sure that fping binary has root ownership and suid flag set.\n#\nFpingLocation={{ zabbix_server_fpinglocation }}\n\n### option: fping6location\n#\tlocation of fping6.\n#\tmake sure that fping6 binary has root ownership and suid flag set.\n#\tmake empty if your fping utility is capable to process ipv6 addresses.\n#\nFping6Location={{ zabbix_server_fping6location }}\n\n### option: sshkeylocation\n#\tlocation of public and private keys for ssh checks and actions.\n#\n{% if zabbix_server_sshkeylocation is defined and zabbix_server_sshkeylocation %}\nSSHKeyLocation={{ zabbix_server_sshkeylocation }}\n{% endif %}\n\n### option: logslowqueries\n#\thow long a database query may take before being logged (in milliseconds).\n#\tonly works if debuglevel set to 3 or 4.\n#\t0 - don't log slow queries.\n#\nLogSlowQueries={{ zabbix_server_logslowqueries }}\n\n### option: tmpdir\n#\ttemporary directory.\n#\nTmpDir={{ zabbix_server_tmpdir }}\n\n### option: startproxypollers\n#\tnumber of pre-forked instances of pollers for passive proxies.\n#\nStartProxyPollers={{ zabbix_server_startproxypollers }}\n\n### option: proxyconfigfrequency\n#\thow often zabbix server sends configuration data to a zabbix proxy in seconds.\n#\tthis parameter is used only for proxies in the passive mode.\n#\nProxyConfigFrequency={{ zabbix_server_proxyconfigfrequency }}\n\n### option: proxydatafrequency\n#\thow often zabbix server requests history data from a zabbix proxy in seconds.\n#\tthis parameter is used only for proxies in the passive mode.\n#\nProxyDataFrequency={{ zabbix_server_proxydatafrequency }}\n\n{% if zabbix_version is version_compare('2.2', '>=') %}\n### option: allowroot\n#\tallow the server to run as 'root'. if disabled and the server is started by 'root', the server\n#\twill try to switch to user 'zabbix' instead. has no effect if started under a regular user.\n#\t0 - do not allow\n#\t1 - allow\n#\nAllowRoot={{ zabbix_server_allowroot }}\n{% endif %}\n\n{% if zabbix_version is version_compare('3.0', '>=') %}\n### Option: User\n# Drop privileges to a specific, existing user on the system.\n# Only has effect if run as 'root' and AllowRoot is disabled.\n#\nUser={{ zabbix_server_user }}\n{% endif %}\n\n### option: include\n#\tyou may include individual files or all files in a directory in the configuration file.\n#\tinstalling zabbix will create include directory in /usr/local/etc, unless modified during the compile time.\n#\nInclude={{ zabbix_server_include }}\n\n{% if zabbix_version is version_compare('3.0', '>=') %}\n### Option: SSLCertLocation\n# Location of SSL client certificates.\n# This parameter is used only in web monitoring.\n#\nSSLCertLocation={{ zabbix_server_sslcertlocation }}\n\n### Option: SSLKeyLocation\n# Location of private keys for SSL client certificates.\n# This parameter is used only in web monitoring.\n#\nSSLKeyLocation={{ zabbix_server_sslkeylocation }}\n\n### Option: SSLCALocation\n# Override the location of certificate authority (CA) files for SSL server certificate verification.\n# If not set, system-wide directory will be used.\n# This parameter is used only in web monitoring and SMTP authentication.\n#\n{% if zabbix_server_sslcalocation is defined and zabbix_server_sslcalocation is not none %}\nSSLCALocation={{ zabbix_server_sslcalocation }}\n{% endif %}\n{% endif %}\n\n####### loadable modules #######\n{% if zabbix_version is version_compare('2.2', '>=') %}\n### option: loadmodulepath\n#\tfull path to location of server modules.\n#\tdefault depends on compilation options.\n#\nLoadModulePath={{ zabbix_server_loadmodulepath }}\n{% endif %}\n\n### option: loadmodule\n#\tmodule to load at server startup. modules are used to extend functionality of the server.\n#\tformat: loadmodule=\n#\tthe modules must be located in directory specified by loadmodulepath.\n#\tit is allowed to include multiple loadmodule parameters.\n#\n{% if zabbix_server_loadmodule is defined and zabbix_server_loadmodule %}\nLoadModule = {{ loadmodule }}\n{% endif %}\n\n{% if zabbix_version is version_compare('3.0', '>=') %}\n####### TLS-RELATED PARAMETERS #######\n\n### Option: TLSCAFile\n#\tFull pathname of a file containing the top-level CA(s) certificates for\n#\tpeer certificate verification.\n#\n# Mandatory: no\n# Default:\n{% if zabbix_server_tlscafile is defined and zabbix_server_tlscafile is not none %}\nTLSCAFile={{ zabbix_server_tlscafile }}\n{% endif %}\n\n### Option: TLSCRLFile\n#\tFull pathname of a file containing revoked certificates.\n#\n# Mandatory: no\n# Default:\n{% if zabbix_server_tlscrlfile is defined and zabbix_server_tlscrlfile is not none %}\nTLSCRLFile={{ zabbix_server_tlscrlfile }}\n{% endif %}\n\n### Option: TLSCertFile\n#\tFull pathname of a file containing the server certificate or certificate chain.\n#\n# Mandatory: no\n# Default:\n{% if zabbix_server_tlscertfile is defined and zabbix_server_tlscertfile is not none %}\nTLSCertFile={{ zabbix_server_tlscertfile }}\n{% endif %}\n\n### Option: TLSKeyFile\n#\tFull pathname of a file containing the server private key.\n#\n# Mandatory: no\n# Default:\n{% if zabbix_server_tlskeyfile is defined and zabbix_server_tlskeyfile is not none %}\nTLSKeyFile={{ zabbix_server_tlskeyfile }}\n{% endif %}\n{% endif %}\n"}

I'm using centos 7

dj-wasabi commented 5 years ago

Please create a new issue and answer all questions in the "bug report" please.