1 /*
2 ** Zabbix
3 ** Copyright (C) 2001-2021 Zabbix SIA
4 **
5 ** This program is free software; you can redistribute it and/or modify
6 ** it under the terms of the GNU General Public License as published by
7 ** the Free Software Foundation; either version 2 of the License, or
8 ** (at your option) any later version.
9 **
10 ** This program is distributed in the hope that it will be useful,
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 ** GNU General Public License for more details.
14 **
15 ** You should have received a copy of the GNU General Public License
16 ** along with this program; if not, write to the Free Software
17 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18 **/
19 
20 #ifndef ZABBIX_CHECKS_SIMPLE_VMWARE_H
21 #define ZABBIX_CHECKS_SIMPLE_VMWARE_H
22 
23 #include "common.h"
24 #if defined(HAVE_LIBXML2) && defined(HAVE_LIBCURL)
25 #include "sysinfo.h"
26 #include "zbxalgo.h"
27 #include "dbcache.h"
28 
29 int	check_vcenter_cluster_discovery(AGENT_REQUEST *request, const char *username, const char *password,
30 		AGENT_RESULT *result);
31 int	check_vcenter_cluster_status(AGENT_REQUEST *request, const char *username, const char *password,
32 		AGENT_RESULT *result);
33 int	check_vcenter_version(AGENT_REQUEST *request, const char *username, const char *password,
34 		AGENT_RESULT *result);
35 int	check_vcenter_fullname(AGENT_REQUEST *request, const char *username, const char *password,
36 		AGENT_RESULT *result);
37 int	check_vcenter_datastore_discovery(AGENT_REQUEST *request, const char *username, const char *password,
38 		AGENT_RESULT *result);
39 int	check_vcenter_datastore_read(AGENT_REQUEST *request, const char *username, const char *password,
40 		AGENT_RESULT *result);
41 int	check_vcenter_datastore_size(AGENT_REQUEST *request, const char *username, const char *password,
42 		AGENT_RESULT *result);
43 int	check_vcenter_datastore_write(AGENT_REQUEST *request, const char *username, const char *password,
44 		AGENT_RESULT *result);
45 int	check_vcenter_datastore_hv_list(AGENT_REQUEST *request, const char *username, const char *password,
46 		AGENT_RESULT *result);
47 
48 int	check_vcenter_hv_cluster_name(AGENT_REQUEST *request, const char *username, const char *password,
49 		AGENT_RESULT *result);
50 int	check_vcenter_hv_cpu_usage(AGENT_REQUEST *request, const char *username, const char *password,
51 		AGENT_RESULT *result);
52 int	check_vcenter_hv_datacenter_name(AGENT_REQUEST *request, const char *username, const char *password,
53 		AGENT_RESULT *result);
54 int	check_vcenter_hv_datastore_discovery(AGENT_REQUEST *request, const char *username, const char *password,
55 		AGENT_RESULT *result);
56 int	check_vcenter_hv_datastore_read(AGENT_REQUEST *request, const char *username, const char *password,
57 		AGENT_RESULT *result);
58 int	check_vcenter_hv_datastore_size(AGENT_REQUEST *request, const char *username, const char *password,
59 		AGENT_RESULT *result);
60 int	check_vcenter_hv_datastore_write(AGENT_REQUEST *request, const char *username, const char *password,
61 		AGENT_RESULT *result);
62 int	check_vcenter_hv_datastore_list(AGENT_REQUEST *request, const char *username, const char *password,
63 		AGENT_RESULT *result);
64 int	check_vcenter_hv_discovery(AGENT_REQUEST *request, const char *username, const char *password,
65 		AGENT_RESULT *result);
66 int	check_vcenter_hv_fullname(AGENT_REQUEST *request, const char *username, const char *password,
67 		AGENT_RESULT *result);
68 int	check_vcenter_hv_hw_cpu_num(AGENT_REQUEST *request, const char *username, const char *password,
69 		AGENT_RESULT *result);
70 int	check_vcenter_hv_hw_cpu_freq(AGENT_REQUEST *request, const char *username, const char *password,
71 		AGENT_RESULT *result);
72 int	check_vcenter_hv_hw_cpu_model(AGENT_REQUEST *request, const char *username, const char *password,
73 		AGENT_RESULT *result);
74 int	check_vcenter_hv_hw_cpu_threads(AGENT_REQUEST *request, const char *username, const char *password,
75 		AGENT_RESULT *result);
76 int	check_vcenter_hv_hw_memory(AGENT_REQUEST *request, const char *username, const char *password,
77 		AGENT_RESULT *result);
78 int	check_vcenter_hv_hw_model(AGENT_REQUEST *request, const char *username, const char *password,
79 		AGENT_RESULT *result);
80 int	check_vcenter_hv_hw_uuid(AGENT_REQUEST *request, const char *username, const char *password,
81 		AGENT_RESULT *result);
82 int	check_vcenter_hv_hw_vendor(AGENT_REQUEST *request, const char *username, const char *password,
83 		AGENT_RESULT *result);
84 int	check_vcenter_hv_memory_size_ballooned(AGENT_REQUEST *request, const char *username, const char *password,
85 		AGENT_RESULT *result);
86 int	check_vcenter_hv_memory_used(AGENT_REQUEST *request, const char *username, const char *password,
87 		AGENT_RESULT *result);
88 int	check_vcenter_hv_network_in(AGENT_REQUEST *request, const char *username, const char *password,
89 		AGENT_RESULT *result);
90 int	check_vcenter_hv_network_out(AGENT_REQUEST *request, const char *username, const char *password,
91 		AGENT_RESULT *result);
92 int	check_vcenter_hv_perfcounter(AGENT_REQUEST *request, const char *username, const char *password,
93 		AGENT_RESULT *result);
94 int	check_vcenter_hv_sensor_health_state(AGENT_REQUEST *request, const char *username, const char *password,
95 		AGENT_RESULT *result);
96 int	check_vcenter_hv_status(AGENT_REQUEST *request, const char *username, const char *password,
97 		AGENT_RESULT *result);
98 int	check_vcenter_hv_maintenance(AGENT_REQUEST *request, const char *username, const char *password,
99 		AGENT_RESULT *result);
100 int	check_vcenter_hv_uptime(AGENT_REQUEST *request, const char *username, const char *password,
101 		AGENT_RESULT *result);
102 int	check_vcenter_hv_version(AGENT_REQUEST *request, const char *username, const char *password,
103 		AGENT_RESULT *result);
104 int	check_vcenter_hv_sensors_get(AGENT_REQUEST *request, const char *username, const char *password,
105 		AGENT_RESULT *result);
106 int	check_vcenter_hv_vm_num(AGENT_REQUEST *request, const char *username, const char *password,
107 		AGENT_RESULT *result);
108 
109 int	check_vcenter_vm_cluster_name(AGENT_REQUEST *request, const char *username, const char *password,
110 		AGENT_RESULT *result);
111 int	check_vcenter_vm_cpu_num(AGENT_REQUEST *request, const char *username, const char *password,
112 		AGENT_RESULT *result);
113 int	check_vcenter_vm_cpu_ready(AGENT_REQUEST *request, const char *username, const char *password,
114 		AGENT_RESULT *result);
115 int	check_vcenter_vm_cpu_usage(AGENT_REQUEST *request, const char *username, const char *password,
116 		AGENT_RESULT *result);
117 int	check_vcenter_vm_datacenter_name(AGENT_REQUEST *request, const char *username, const char *password,
118 		AGENT_RESULT *result);
119 int	check_vcenter_vm_discovery(AGENT_REQUEST *request, const char *username, const char *password,
120 		AGENT_RESULT *result);
121 int	check_vcenter_vm_hv_name(AGENT_REQUEST *request, const char *username, const char *password,
122 		AGENT_RESULT *result);
123 int	check_vcenter_vm_memory_size(AGENT_REQUEST *request, const char *username, const char *password,
124 		AGENT_RESULT *result);
125 int	check_vcenter_vm_memory_size_ballooned(AGENT_REQUEST *request, const char *username, const char *password,
126 		AGENT_RESULT *result);
127 int	check_vcenter_vm_memory_size_compressed(AGENT_REQUEST *request, const char *username, const char *password,
128 		AGENT_RESULT *result);
129 int	check_vcenter_vm_memory_size_swapped(AGENT_REQUEST *request, const char *username, const char *password,
130 		AGENT_RESULT *result);
131 int	check_vcenter_vm_memory_size_usage_guest(AGENT_REQUEST *request, const char *username, const char *password,
132 		AGENT_RESULT *result);
133 int	check_vcenter_vm_memory_size_usage_host(AGENT_REQUEST *request, const char *username, const char *password,
134 		AGENT_RESULT *result);
135 int	check_vcenter_vm_memory_size_private(AGENT_REQUEST *request, const char *username, const char *password,
136 		AGENT_RESULT *result);
137 int	check_vcenter_vm_memory_size_shared(AGENT_REQUEST *request, const char *username, const char *password,
138 		AGENT_RESULT *result);
139 int	check_vcenter_vm_powerstate(AGENT_REQUEST *request, const char *username, const char *password,
140 		AGENT_RESULT *result);
141 int	check_vcenter_vm_net_if_discovery(AGENT_REQUEST *request, const char *username, const char *password,
142 		AGENT_RESULT *result);
143 int	check_vcenter_vm_net_if_in(AGENT_REQUEST *request, const char *username, const char *password,
144 		AGENT_RESULT *result);
145 int	check_vcenter_vm_net_if_out(AGENT_REQUEST *request, const char *username, const char *password,
146 		AGENT_RESULT *result);
147 int	check_vcenter_vm_perfcounter(AGENT_REQUEST *request, const char *username, const char *password,
148 		AGENT_RESULT *result);
149 int	check_vcenter_vm_storage_committed(AGENT_REQUEST *request, const char *username, const char *password,
150 		AGENT_RESULT *result);
151 int	check_vcenter_vm_storage_unshared(AGENT_REQUEST *request, const char *username, const char *password,
152 		AGENT_RESULT *result);
153 int	check_vcenter_vm_storage_uncommitted(AGENT_REQUEST *request, const char *username, const char *password,
154 		AGENT_RESULT *result);
155 int	check_vcenter_vm_uptime(AGENT_REQUEST *request, const char *username, const char *password,
156 		AGENT_RESULT *result);
157 int	check_vcenter_vm_vfs_dev_discovery(AGENT_REQUEST *request, const char *username, const char *password,
158 		AGENT_RESULT *result);
159 int	check_vcenter_vm_vfs_dev_read(AGENT_REQUEST *request, const char *username, const char *password,
160 		AGENT_RESULT *result);
161 int	check_vcenter_vm_vfs_dev_write(AGENT_REQUEST *request, const char *username, const char *password,
162 		AGENT_RESULT *result);
163 int	check_vcenter_vm_vfs_fs_discovery(AGENT_REQUEST *request, const char *username, const char *password,
164 		AGENT_RESULT *result);
165 int	check_vcenter_vm_vfs_fs_size(AGENT_REQUEST *request, const char *username, const char *password,
166 		AGENT_RESULT *result);
167 
168 int	check_vcenter_dc_discovery(AGENT_REQUEST *request, const char *username, const char *password,
169 		AGENT_RESULT *result);
170 
171 int	check_vcenter_eventlog(AGENT_REQUEST *request, const DC_ITEM *item, AGENT_RESULT *result,
172 		zbx_vector_ptr_t *add_results);
173 
174 #endif	/* defined(HAVE_LIBXML2) && defined(HAVE_LIBCURL) */
175 #endif
176