--
-- PostgreSQL database dump
--

SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

SET search_path = zabbix, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = true;

--
-- Name: hosts; Type: TABLE; Schema: zabbix; Owner: zabbix; Tablespace: 
--

CREATE TABLE hosts (
    hostid bigint NOT NULL,
    proxy_hostid bigint,
    host character varying(64) DEFAULT ''::character varying NOT NULL,
    status integer DEFAULT 0 NOT NULL,
    disable_until integer DEFAULT 0 NOT NULL,
    error character varying(128) DEFAULT ''::character varying NOT NULL,
    available integer DEFAULT 0 NOT NULL,
    errors_from integer DEFAULT 0 NOT NULL,
    lastaccess integer DEFAULT 0 NOT NULL,
    ipmi_authtype integer DEFAULT 0 NOT NULL,
    ipmi_privilege integer DEFAULT 2 NOT NULL,
    ipmi_username character varying(16) DEFAULT ''::character varying NOT NULL,
    ipmi_password character varying(20) DEFAULT ''::character varying NOT NULL,
    ipmi_disable_until integer DEFAULT 0 NOT NULL,
    ipmi_available integer DEFAULT 0 NOT NULL,
    snmp_disable_until integer DEFAULT 0 NOT NULL,
    snmp_available integer DEFAULT 0 NOT NULL,
    maintenanceid bigint,
    maintenance_status integer DEFAULT 0 NOT NULL,
    maintenance_type integer DEFAULT 0 NOT NULL,
    maintenance_from integer DEFAULT 0 NOT NULL,
    ipmi_errors_from integer DEFAULT 0 NOT NULL,
    snmp_errors_from integer DEFAULT 0 NOT NULL,
    ipmi_error character varying(128) DEFAULT ''::character varying NOT NULL,
    snmp_error character varying(128) DEFAULT ''::character varying NOT NULL,
    jmx_disable_until integer DEFAULT 0 NOT NULL,
    jmx_available integer DEFAULT 0 NOT NULL,
    jmx_errors_from integer DEFAULT 0 NOT NULL,
    jmx_error character varying(128) DEFAULT ''::character varying NOT NULL,
    name character varying(64) DEFAULT ''::character varying NOT NULL
);


ALTER TABLE zabbix.hosts OWNER TO zabbix;

--
-- Name: hosts_pkey; Type: CONSTRAINT; Schema: zabbix; Owner: zabbix; Tablespace: 
--

ALTER TABLE ONLY hosts
    ADD CONSTRAINT hosts_pkey PRIMARY KEY (hostid);


--
-- Name: hosts_1; Type: INDEX; Schema: zabbix; Owner: zabbix; Tablespace: 
--

CREATE INDEX hosts_1 ON hosts USING btree (host);


--
-- Name: hosts_2; Type: INDEX; Schema: zabbix; Owner: zabbix; Tablespace: 
--

CREATE INDEX hosts_2 ON hosts USING btree (status);


--
-- Name: hosts_3; Type: INDEX; Schema: zabbix; Owner: zabbix; Tablespace: 
--

CREATE INDEX hosts_3 ON hosts USING btree (proxy_hostid);


--
-- Name: hosts_4; Type: INDEX; Schema: zabbix; Owner: zabbix; Tablespace: 
--

CREATE INDEX hosts_4 ON hosts USING btree (name);


--
-- Name: c_hosts_1; Type: FK CONSTRAINT; Schema: zabbix; Owner: zabbix
--

ALTER TABLE ONLY hosts
    ADD CONSTRAINT c_hosts_1 FOREIGN KEY (proxy_hostid) REFERENCES hosts(hostid);


--
-- Name: c_hosts_2; Type: FK CONSTRAINT; Schema: zabbix; Owner: zabbix
--

ALTER TABLE ONLY hosts
    ADD CONSTRAINT c_hosts_2 FOREIGN KEY (maintenanceid) REFERENCES maintenances(maintenanceid);


--
-- PostgreSQL database dump complete
--

