OpenVAS CLI  1.4.5
check_omp.c File Reference

The CHECK_OMP Nagios Command Plugin. More...

#include <assert.h>
#include <glib.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <openvas/misc/openvas_server.h>
#include <openvas/misc/openvas_logging.h>
#include <openvas/omp/omp.h>
Include dependency graph for check_omp.c:

Go to the source code of this file.

Data Structures

struct  server_connection_t
 Information needed to handle a connection to a server. More...
 
struct  cmd_status_opts_t
 Options for status display. More...
 

Macros

#define _GNU_SOURCE
 
#define OMP_PROGNAME   "check_omp"
 The name of this program. More...
 
#define OPENVASMD_ADDRESS   "127.0.0.1"
 Default Manager (openvasmd) address. More...
 
#define OPENVASMD_PORT   9390
 Default Manager port. More...
 
#define DEFAULT_SOCKET_TIMEOUT   10
 
#define NAGIOS_OK   0
 The plugin was able to contact the OpenVAS Manager. The returned results did not indicate a medium or high threat or an upward trend. More...
 
#define NAGIOS_WARNING   1
 The plugin was able to contact the OpenVAS Manager. The returned results did indicate a medium threat. More...
 
#define NAGIOS_CRITICAL   2
 The plugin was able to contact the OpenVAS Manager. The returned results did indicate a high threat or an upward trend. More...
 
#define NAGIOS_UNKNOWN   3
 The plugin was not able to contact the OpenVAS Manager or was unable to parse the returned results. The response should include a diagnostic message. More...
 
#define NAGIOS_DEPENDENT   4
 
#define STATUS_BY_TREND   1
 
#define STATUS_BY_LAST_REPORT   2
 

Functions

int main (int argc, char **argv)
 

Detailed Description

The CHECK_OMP Nagios Command Plugin.

This command line tool provides command line arguments corresponding to the OMP protocol commands for Nagios.

Definition in file check_omp.c.

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Definition at line 49 of file check_omp.c.

◆ DEFAULT_SOCKET_TIMEOUT

#define DEFAULT_SOCKET_TIMEOUT   10

Definition at line 84 of file check_omp.c.

Referenced by main().

◆ NAGIOS_CRITICAL

#define NAGIOS_CRITICAL   2

The plugin was able to contact the OpenVAS Manager. The returned results did indicate a high threat or an upward trend.

Definition at line 108 of file check_omp.c.

◆ NAGIOS_DEPENDENT

#define NAGIOS_DEPENDENT   4

Definition at line 117 of file check_omp.c.

◆ NAGIOS_OK

#define NAGIOS_OK   0

The plugin was able to contact the OpenVAS Manager. The returned results did not indicate a medium or high threat or an upward trend.

Definition at line 96 of file check_omp.c.

◆ NAGIOS_UNKNOWN

#define NAGIOS_UNKNOWN   3

The plugin was not able to contact the OpenVAS Manager or was unable to parse the returned results. The response should include a diagnostic message.

Definition at line 115 of file check_omp.c.

◆ NAGIOS_WARNING

#define NAGIOS_WARNING   1

The plugin was able to contact the OpenVAS Manager. The returned results did indicate a medium threat.

Definition at line 102 of file check_omp.c.

◆ OMP_PROGNAME

#define OMP_PROGNAME   "check_omp"

The name of this program.

Definition at line 71 of file check_omp.c.

◆ OPENVASMD_ADDRESS

#define OPENVASMD_ADDRESS   "127.0.0.1"

Default Manager (openvasmd) address.

Definition at line 76 of file check_omp.c.

◆ OPENVASMD_PORT

#define OPENVASMD_PORT   9390

Default Manager port.

Definition at line 81 of file check_omp.c.

Referenced by main().

◆ STATUS_BY_LAST_REPORT

#define STATUS_BY_LAST_REPORT   2

Definition at line 368 of file check_omp.c.

◆ STATUS_BY_TREND

#define STATUS_BY_TREND   1

Definition at line 367 of file check_omp.c.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)
Todo:
Other modules ship with log level set to warning.

Definition at line 1008 of file check_omp.c.

References DEFAULT_SOCKET_TIMEOUT, and OPENVASMD_PORT.

1009 {
1010  server_connection_t *connection = NULL;
1011  /* The return status of the command. */
1012  int exit_status = -1;
1013 
1014  /* Global options. */
1015  static gboolean print_version = FALSE;
1016  static gboolean be_verbose = FALSE;
1017  static gchar *manager_host_string = NULL;
1018  static gint manager_port = OPENVASMD_PORT;
1019  static gchar *omp_username = NULL;
1020  static gchar *omp_password = NULL;
1021  /* Command get-omp-version. */
1022  static gboolean cmd_ping = FALSE;
1023  static gint timeout = DEFAULT_SOCKET_TIMEOUT;
1024  static gboolean cmd_status = FALSE;
1025  static gboolean status_trend = FALSE;
1026  static gboolean status_last_report = FALSE;
1027  static gchar *task_string = NULL;
1028  static gchar *host_filter = NULL;
1029  static gboolean connection_details = FALSE;
1030  static gboolean report_link = FALSE;
1031  static gboolean display_dfn_ids = FALSE;
1032  static gboolean display_oids = FALSE;
1033  static gboolean display_descriptions = FALSE;
1034  static gboolean display_log_messages = FALSE;
1035  static gboolean display_scan_end = FALSE;
1036  static guint autofp = 0;
1037  static gboolean empty_as_unknown = FALSE;
1038  static gboolean use_asset_management = FALSE;
1039  /* The rest of the args. */
1040  static gchar **rest = NULL;
1041 
1042  GError *error = NULL;
1043 
1044  GOptionContext *option_context;
1045  static GOptionEntry option_entries[] = {
1046  /* Global options. */
1047  {"host", 'H', 0, G_OPTION_ARG_STRING, &manager_host_string,
1048  "Connect to manager on host <host>", "<host>"},
1049  {"port", 'p', 0, G_OPTION_ARG_INT, &manager_port,
1050  "Use port number <number>", "<number>"},
1051  {"version", 'V', 0, G_OPTION_ARG_NONE, &print_version,
1052  "Print version.", NULL},
1053  {"verbose", 'v', 0, G_OPTION_ARG_NONE, &be_verbose,
1054  "Verbose messages (WARNING: may reveal passwords).", NULL},
1055  {"Werror", 0, 0, G_OPTION_ARG_NONE, &warnings_are_errors,
1056  "Turn status UNKNOWN into status CRITICIAL.", NULL},
1057  {"username", 'u', 0, G_OPTION_ARG_STRING, &omp_username,
1058  "OMP username", "<username>"},
1059  {"password", 'w', 0, G_OPTION_ARG_STRING, &omp_password,
1060  "OMP password", "<password>"},
1061  {"ping", 'O', 0, G_OPTION_ARG_NONE, &cmd_ping,
1062  "Ping the manager", NULL},
1063  {"timeout", 't', 0, G_OPTION_ARG_INT, &timeout,
1064  "Wait <seconds> for response (0 disables timeout)", "<seconds>"},
1065  /* @todo "ping-timeout" remains a hidden synonym for "timout" for backward
1066  * compatibility. Can be removed for version >= 1.5.
1067  */
1068  {"ping-timeout", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_INT, &timeout,
1069  NULL, NULL},
1070  {"status", 0, 0, G_OPTION_ARG_NONE, &cmd_status,
1071  "Report status of task", NULL},
1072  {"trend", 0, 0, G_OPTION_ARG_NONE, &status_trend,
1073  "Report status by trend (default)", NULL},
1074  {"last-report", 0, 0, G_OPTION_ARG_NONE, &status_last_report,
1075  "Report status by last report", NULL},
1076  {"task", 'T', 0, G_OPTION_ARG_STRING, &task_string,
1077  "Report status of task <task>", "<task>"},
1078  {"host-filter", 'F', 0, G_OPTION_ARG_STRING, &host_filter,
1079  "Report last report status of host <ip>", "<ip>"},
1080  {"overrides", 0, 0, G_OPTION_ARG_INT, &overrides_flag,
1081  "Include overrides (N: 0=no, 1=yes)", "N"},
1082  {"details", 'd', 0, G_OPTION_ARG_NONE, &connection_details,
1083  "Include connection details in output", NULL},
1084  {"report-link", 'l', 0, G_OPTION_ARG_NONE, &report_link,
1085  "Include URL of report in output", NULL},
1086  {"dfn", 0, 0, G_OPTION_ARG_NONE, &display_dfn_ids,
1087  "Include DFN-CERT IDs on vulnerabilities in output", NULL},
1088  {"oid", 0, 0, G_OPTION_ARG_NONE, &display_oids,
1089  "Include OIDs of NVTs finding vulnerabilities in output", NULL},
1090  {"descr", 0, 0, G_OPTION_ARG_NONE, &display_descriptions,
1091  "Include descriptions of NVTs finding vulnerabilities in output", NULL},
1092  {"showlog", 0, 0, G_OPTION_ARG_NONE, &display_log_messages,
1093  "Include log messages in output", NULL},
1094  {"scanend", 0, 0, G_OPTION_ARG_NONE, &display_scan_end,
1095  "Include timestamp of scan end in output", NULL},
1096  {"autofp", 0, 0, G_OPTION_ARG_INT, &autofp,
1097  "Trust vendor security updates for automatic false positive filtering (0=No, 1=full match, 2=partial).", "<n>"},
1098  {"empty-as-unknown", 'e', 0, G_OPTION_ARG_NONE, &empty_as_unknown,
1099  "Respond with UNKNOWN on empty results", NULL},
1100  {"use-asset-management", 'A', 0, G_OPTION_ARG_NONE, &use_asset_management,
1101  "Request host status via Asset Management", NULL},
1102  {G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &rest,
1103  NULL, NULL},
1104  {NULL, 0, 0, 0, NULL, NULL, NULL}
1105  };
1106 
1107  if (setlocale (LC_ALL, "") == NULL)
1108  {
1109  do_exit (respond (NAGIOS_UNKNOWN, "Failed to setlocale\n\n"));
1110  }
1111 
1112  option_context =
1113  g_option_context_new ("- OpenVAS OMP Command Line Interface");
1114  g_option_context_add_main_entries (option_context, option_entries, NULL);
1115  if (!g_option_context_parse (option_context, &argc, &argv, &error))
1116  {
1117  printf ("%s\n\n", error->message);
1118  do_exit (NAGIOS_UNKNOWN);
1119  }
1120  g_option_context_free (option_context);
1121 
1122  if (print_version)
1123  {
1124  printf ("Check-OMP Nagios Command Plugin %s\n", OPENVASCLI_VERSION);
1125  printf ("Copyright (C) 2016 Greenbone Networks GmbH\n");
1126  printf ("License GPLv2+: GNU GPL version 2 or later\n");
1127  printf
1128  ("This is free software: you are free to change and redistribute it.\n"
1129  "There is NO WARRANTY, to the extent permitted by law.\n\n");
1130  do_exit (EXIT_SUCCESS);
1131  }
1132 
1133  /* Check that one and at most one command option is present. */
1134  {
1135  int commands;
1136  commands = (int) cmd_ping + (int) cmd_status;
1137  if (commands == 0)
1138  {
1139  respond (NAGIOS_UNKNOWN, "One command option must be present.\n");
1140  do_exit (NAGIOS_UNKNOWN);
1141  }
1142  if (commands > 1)
1143  {
1144  respond (NAGIOS_UNKNOWN, "Only one command option must be present.\n");
1145  do_exit (NAGIOS_UNKNOWN);
1146  }
1147  }
1148 
1149  /* Set defaults. */
1150  if (!status_trend && !status_last_report)
1151  status_trend = TRUE;
1152  if (status_trend && status_last_report)
1153  {
1154  respond (NAGIOS_UNKNOWN, "--trend and --last-report are exclusive.\n");
1155  do_exit (NAGIOS_UNKNOWN);
1156  }
1157 
1158 
1159  /* Setup the connection structure. */
1160  connection = g_malloc0 (sizeof (*connection));
1161 
1162  if (manager_host_string != NULL)
1163  connection->host_string = manager_host_string;
1164  else
1165  connection->host_string = OPENVASMD_ADDRESS;
1166 
1167  if (manager_port <= 0 || manager_port >= 65536)
1168  {
1169  respond (NAGIOS_UNKNOWN,
1170  "Manager port must be a number between 0 and 65536.\n");
1171  do_exit (NAGIOS_UNKNOWN);
1172  }
1173 
1174  connection->port = manager_port;
1175 
1176  if (omp_username != NULL)
1177  connection->username = omp_username;
1178  if (omp_password != NULL)
1179  connection->password = omp_password;
1180 
1181  if (timeout < 0)
1182  {
1183  respond (NAGIOS_UNKNOWN,
1184  "Timeout must be a non-negative number.\n");
1185  do_exit (NAGIOS_UNKNOWN);
1186  }
1187 
1188  connection->timeout = timeout;
1189 
1190  if (be_verbose)
1191  {
1193  fprintf (stderr, "Will try to connect to host %s, port %d...\n",
1194  connection->host_string, connection->port);
1195  }
1196  else
1197  {
1198 #ifndef _WIN32
1199  g_log_set_default_handler (openvas_log_silent, NULL);
1200 #endif
1201  }
1202 
1203  /* Run the single command. */
1204 
1205  if (cmd_ping)
1206  {
1207  int res;
1208  manager_open (connection);
1209  /* Returns 0 on success, 1 if manager closed connection, 2 on
1210  timeout, -1 on error */
1211  res = omp_ping (&(connection->session), connection->timeout);
1212  if (res == 0)
1213  {
1214  exit_status = respond (NAGIOS_OK, "Alive and kicking!\n");
1215  }
1216  else if (res == 1)
1217  {
1218  exit_status = respond (NAGIOS_CRITICAL, "Connection closed\n");
1219  }
1220  else if (res == 2)
1221  {
1222  exit_status = respond (NAGIOS_CRITICAL, "Connection timed out\n");
1223  }
1224  else
1225  {
1226  exit_status = respond (NAGIOS_CRITICAL, "Unknown error\n");
1227  }
1228  manager_close (connection);
1229  }
1230  else if (cmd_status)
1231  {
1232  entity_t status;
1233 
1234  if (use_asset_management)
1235  {
1236  if (host_filter == NULL)
1237  {
1238  exit_status =
1239  respond (NAGIOS_UNKNOWN, "Status request via Asset Management requires host filter\n");
1240  }
1241  else
1242  {
1243  entity_t asset_report;
1244  entity_t host_detail;
1245  entities_t host_details;
1246  gchar *report_id = NULL;
1247  entity_t full_report;
1248  cmd_status_opts_t status_opts;
1249 
1250  int res;
1251  int high_count = 0;
1252  int medium_count = 0;
1253  int low_count = 0;
1254 
1255  omp_get_report_opts_t asset_opts = omp_get_report_opts_defaults;
1256  omp_get_report_opts_t report_opts = omp_get_report_opts_defaults;
1257 
1258  asset_opts.overrides = overrides_flag;
1259  asset_opts.autofp = autofp;
1260  asset_opts.timeout = timeout;
1261  asset_opts.type = "assets";
1262  asset_opts.host = host_filter;
1263 
1264  manager_open (connection);
1265  res = omp_get_report_ext (&(connection->session), asset_opts, &asset_report);
1266  if (res == 0)
1267  {
1268  asset_report = entity_child (asset_report, "report");
1269  if (asset_report == NULL)
1270  {
1271  exit_status = respond (NAGIOS_UNKNOWN, "Failed to get first asset report wrapper\n");
1272  }
1273  else
1274  {
1275  asset_report = entity_child (asset_report, "report");
1276  if (asset_report == NULL)
1277  {
1278  exit_status = respond (NAGIOS_UNKNOWN, "Failed to get first asset report\n");
1279  }
1280  else
1281  {
1282  asset_report = entity_child (asset_report, "host");
1283  if (asset_report == NULL)
1284  {
1285  exit_status = respond (NAGIOS_UNKNOWN, "Failed to get asset host element\n");
1286  }
1287  else
1288  {
1289  host_details = asset_report->entities;
1290  while ((host_detail = first_entity (host_details)))
1291  {
1292  if (strcmp (entity_name (host_detail), "detail") == 0)
1293  {
1294  entity_t name;
1295  entity_t value;
1296 
1297  name = entity_child (host_detail, "name");
1298  value = entity_child (host_detail, "value");
1299 
1300  if (strcmp (entity_text (name), "report/@id") == 0)
1301  report_id = g_strdup (entity_text (value));
1302  if (strcmp (entity_text (name), "report/result_count/high") == 0)
1303  high_count = atoi (entity_text (value));
1304  if (strcmp (entity_text (name), "report/result_count/medium") == 0)
1305  medium_count = atoi (entity_text (value));
1306  if (strcmp (entity_text (name), "report/result_count/low") == 0)
1307  low_count = atoi (entity_text (value));
1308  }
1309  host_details = next_entities (host_details);
1310  }
1311 
1312  if (report_id == NULL)
1313  {
1314  exit_status = respond (NAGIOS_UNKNOWN, "Failed to get report_id via Asset Management\n");
1315  }
1316  else
1317  {
1318  if ((high_count + medium_count) == 0)
1319  {
1320  int response_code = NAGIOS_OK;
1321  exit_status = respond (response_code,
1322  "%i vulnerabilities found - High: 0 Medium: 0 Low: %i\n",
1323  low_count, low_count);
1324 
1325  if (report_link)
1326  respond_data ("https://%s/omp?cmd=get_report&report_id=%s\n",
1327  (gchar *) (gpointer) connection->host_string, report_id);
1328 
1329  if (display_scan_end)
1330  respond_data ("SCAN_END: %s\n", entity_text (entity_child (asset_report, "end")));
1331 
1332  respond_perf_data ("|High=%i Medium=%i Low=%i\n",
1333  high_count, medium_count, low_count);
1334  }
1335  else
1336  {
1337  report_opts.report_id = report_id;
1338 
1339  status_opts.report_link = report_link;
1340  status_opts.dfn_ids = display_dfn_ids;
1341  status_opts.oids = display_oids;
1342  status_opts.manager_host = (gpointer) connection->host_string;
1343  status_opts.descr = display_descriptions;
1344  status_opts.log_messages = display_log_messages;
1345  status_opts.scan_end = display_scan_end;
1346  status_opts.autofp = autofp;
1347  status_opts.timeout = timeout;
1348  status_opts.empty_as_unknown = empty_as_unknown;
1349 
1350  report_opts.apply_overrides = overrides_flag;
1351  report_opts.autofp = status_opts.autofp;
1352  report_opts.timeout = status_opts.timeout;
1353 
1354  if (!display_log_messages)
1355  report_opts.levels = "hml";
1356 
1357  res = omp_get_report_ext (&(connection->session), report_opts, &full_report);
1358  if (res == 0)
1359  {
1360  full_report = entity_child (full_report, "report");
1361  if (full_report == NULL)
1362  {
1363  exit_status = respond (NAGIOS_UNKNOWN,
1364  "Failed to get first full report wrapper\n");
1365  }
1366  else
1367  {
1368  full_report = entity_child (full_report, "report");
1369  if (full_report == NULL)
1370  {
1371  exit_status = respond (NAGIOS_UNKNOWN,
1372  "Failed to get first full report\n");
1373  }
1374  else
1375  {
1376 
1377  exit_status = filter_report (full_report, host_filter, status_opts);
1378  }
1379  }
1380  }
1381  else if (res == 2)
1382  {
1383  exit_status = respond (NAGIOS_UNKNOWN,
1384  "Timeout while getting full report.\n");
1385  }
1386  else
1387  {
1388  exit_status = respond (NAGIOS_UNKNOWN,
1389  "Failed to get full report.\n");
1390  }
1391  }
1392  }
1393  }
1394  }
1395  }
1396  }
1397  else if (res == 2)
1398  {
1399  exit_status = respond (NAGIOS_UNKNOWN, "Timeout while getting asset report.\n");
1400  }
1401  else
1402  {
1403  exit_status = respond (NAGIOS_UNKNOWN, "Failed to get asset report.\n");
1404  }
1405  }
1406  }
1407  else if (task_string == NULL)
1408  {
1409  exit_status =
1410  respond (NAGIOS_UNKNOWN, "Status request requires task name\n");
1411  }
1412  else
1413  {
1414  manager_open (connection);
1415  omp_get_tasks_opts_t opts;
1416  cmd_status_opts_t status_opts;
1417 
1418  opts = omp_get_tasks_opts_defaults;
1419  opts.details = 1;
1420  /* TODO: Needs to be free'd at some point */
1421  opts.filter = g_strdup_printf ("permission=any owner=any rows=1 name=\"%s\"", task_string);
1422  opts.timeout = timeout;
1423 
1424  if (display_descriptions)
1425  display_oids = TRUE;
1426 
1427  if (display_dfn_ids)
1428  display_oids = TRUE;
1429 
1430  status_opts.report_link = report_link;
1431  status_opts.dfn_ids = display_dfn_ids;
1432  status_opts.oids = display_oids;
1433  status_opts.manager_host = (gpointer) connection->host_string;
1434  status_opts.descr = display_descriptions;
1435  status_opts.log_messages = display_log_messages;
1436  status_opts.scan_end = display_scan_end;
1437  status_opts.autofp = autofp;
1438  status_opts.timeout = timeout;
1439  status_opts.empty_as_unknown = empty_as_unknown;
1440 
1441  /* Returns 0 on success, 2 on timeout, -1 or OMP code on error. */
1442  switch (omp_get_tasks_ext (&(connection->session), opts, &status))
1443  {
1444  case 0:
1445  exit_status =
1446  cmd_status_impl (connection, task_string, status->entities,
1447  status_trend ? STATUS_BY_TREND :
1448  STATUS_BY_LAST_REPORT, host_filter,
1449  status_opts);
1450  break;
1451  case 2:
1452  exit_status = respond (NAGIOS_UNKNOWN, "Timeout while getting tasks\n");
1453  break;
1454  default:
1455  exit_status = respond (NAGIOS_UNKNOWN, "Get tasks failed\n");
1456  break;
1457  }
1458 
1459  manager_close (connection);
1460  }
1461  }
1462  else
1463  /* The option processing ensures that at least one command is present. */
1464  assert (0);
1465 
1466  /* Exit. */
1467 
1468  if (connection_details)
1469  {
1470  if (connection->host_string)
1471  respond_data ("GSM_Host: %s:%d\n", connection->host_string,
1472  (int) connection->port);
1473  if (connection->username)
1474  respond_data ("OMP_User: %s\n", connection->username);
1475  if (task_string && cmd_status)
1476  respond_data ("Task: %s\n", task_string);
1477  }
1478 
1479  if (be_verbose)
1480  {
1481  if (exit_status != NAGIOS_OK)
1482  respond_data ("Command failed.\n");
1483  else
1484  respond_data ("Command completed successfully.\n");
1485  }
1486 
1487  do_exit (exit_status);
1488 }
gpointer manager_host
Pointer to name of the manager host for use in the report link.
Definition: check_omp.c:145
gchar * password
Password for user with which to connect.
Definition: omp.c:110
#define STATUS_BY_LAST_REPORT
Definition: check_omp.c:368
#define NAGIOS_OK
The plugin was able to contact the OpenVAS Manager. The returned results did not indicate a medium or...
Definition: check_omp.c:96
#define OPENVASMD_PORT
Default Manager port.
Definition: check_omp.c:81
gboolean log_messages
TRUE if log messages should be included.
Definition: check_omp.c:146
Information needed to handle a connection to a server.
Definition: omp.c:105
gboolean report_link
TRUE if the report URL should be included.
Definition: check_omp.c:141
#define OPENVASMD_ADDRESS
Default Manager (openvasmd) address.
Definition: check_omp.c:76
Options for status display.
Definition: check_omp.c:139
gint timeout
Timeout of request.
Definition: check_omp.c:149
gboolean descr
TRUE if NVT descriptions should be included.
Definition: check_omp.c:144
guint autofp
Whether to trust vendor security updates. 0 No, 1 full match, 2 partial.
Definition: check_omp.c:148
#define NAGIOS_UNKNOWN
The plugin was not able to contact the OpenVAS Manager or was unable to parse the returned results...
Definition: check_omp.c:115
gboolean oids
TRUE if NVT OIDs should be included.
Definition: check_omp.c:143
gchar * username
Username with which to connect.
Definition: omp.c:109
gnutls_session_t session
GnuTLS Session to use.
Definition: omp.c:107
gint port
Port of server.
Definition: omp.c:113
gchar * host_string
Server host string.
Definition: omp.c:111
#define DEFAULT_SOCKET_TIMEOUT
Definition: check_omp.c:84
#define STATUS_BY_TREND
Definition: check_omp.c:367
gint timeout
Timeout of request.
Definition: omp.c:118
gboolean dfn_ids
TRUE if DFN-CERT-IDs should be included.
Definition: check_omp.c:142
#define NAGIOS_CRITICAL
The plugin was able to contact the OpenVAS Manager. The returned results did indicate a high threat o...
Definition: check_omp.c:108
gboolean empty_as_unknown
TRUE if empty results should produce an UNKNOWN response instead of OK.
Definition: check_omp.c:150
gboolean scan_end
TRUE if the time the scan finished should be included.
Definition: check_omp.c:147