apiVersion: v1
kind: ReplicationController
metadata:
  name: zabbix-server
  namespace: monitoring
  labels:
    app: zabbix
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: zabbix-server
        app: zabbix
    spec:
      #fixed ip address
      nodeName: node01
      hostPID: true
      hostIPC: true
      hostNetwork: true
      dnsPolicy: ClusterFirstWithHostNet
      containers:
        - name: zabbix-server
          #image: monitoringartist/zabbix-xxl:latest
          image: zabbix/zabbix-java-gateway:latest
          ports:
          - containerPort: 162
            name: snmptrapd
          - containerPort: 10051
            name: zabbix-trapper
          - containerPort: 10052
            name: zabbix-jmx
          env:
          - name: DB_SERVER_HOST
            value: "zabbix-db"
          - name: POSTGRES_DB
            value: "zabbix"
          - name: POSTGRES_USER
            value: "zabbix"
          - name: POSTGRES_PASSWORD
            value: "pg_password"
          #- name: ZBX_LOADMODULE
          #  value: ""
          - name: ZBX_DEBUGLEVEL
            value: "3"
          - name: ZBX_TIMEOUT
            value: "8"
          #- name: ZBX_HISTORYSTORAGEURL
          #  value: "http://elasticsearch:9200" # Available since 3.4.0
          #- name: ZBX_HISTORYSTORAGETYPES
          #  value: "uint,dbl,str,log,text" # Available since 3.4.0
          - name: ZBX_STARTPOLLERS
            value: "5"
          - name: ZBX_IPMIPOLLERS
            value: "0"
          - name: ZBX_STARTPREPROCESSORS
            value: "3" # Available since 3.4.0
          - name: ZBX_STARTPOLLERSUNREACHABLE
            value: "1"
          - name: ZBX_STARTTRAPPERS
            value: "5"
          - name: ZBX_STARTPINGERS
            value: "3"
          - name: ZBX_STARTDISCOVERERS
            value: "10"
          - name: ZBX_STARTHTTPPOLLERS
            value: "1"
          - name: ZBX_STARTTIMERS
            value: "10"
          - name: ZBX_STARTESCALATORS
            value: "1"
          - name: ZBX_STARTALERTERS
            value: "8" # Available since 3.4.0
          - name: ZBX_JAVAGATEWAY
            value: "zabbix-java-gateway"
          - name: ZBX_JAVAGATEWAYPORT
            value: "10052"
          - name: ZBX_STARTJAVAPOLLERS
            value: "5"
          - name: ZBX_STARTVMWARECOLLECTORS
            value: "0"
          - name: ZBX_VMWAREFREQUENCY
            value: "60"
          - name: ZBX_VMWAREPERFFREQUENCY
            value: "60"
          - name: ZBX_VMWARECACHESIZE
            value: "8M"
          - name: ZBX_VMWARETIMEOUT
            value: "10"
          - name: ZBX_ENABLE_SNMP_TRAPS
            value: "false"
          - name: ZBX_HOUSEKEEPINGFREQUENCY
            value: "1"
          - name: ZBX_MAXHOUSEKEEPERDELETE
            value: "5000"
          - name: ZBX_SENDERFREQUENCY
            value: "30"
          - name: ZBX_CACHESIZE
            value: "128M"
          - name: ZBX_CACHEUPDATEFREQUENCY
            value: "60"
          - name: ZBX_STARTDBSYNCERS
            value: "4"
          - name: ZBX_HISTORYCACHESIZE
            value: "256M"
          - name: ZBX_HISTORYINDEXCACHESIZE
            value: "32M"
          - name: ZBX_TRENDCACHESIZE
            value: "16M"
          - name: ZBX_VALUECACHESIZE
            value: "64M"
          - name: ZBX_TRAPPERIMEOUT
            value: "300"
          - name: ZBX_UNREACHABLEPERIOD
            value: "45"
          - name: ZBX_UNAVAILABLEDELAY
            value: "60"
          - name: ZBX_UNREACHABLEDELAY
            value: "15"
          - name: ZBX_LOGSLOWQUERIES
            value: "3000"
          - name: ZBX_STARTPROXYPOLLERS
            value: "4"
          - name: ZBX_PROXYCONFIGFREQUENCY
            value: "600"
          - name: ZBX_PROXYDATAFREQUENCY
            value: "1"
