Zabbix Documentation 4.0

3.04.05.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.24.4Guidelines

User Tools

Site Tools


manual:config:items:loadablemodules

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
manual:config:items:loadablemodules [2019/09/12 10:18]
martins-v code highlighting fix
manual:config:items:loadablemodules [2020/06/25 11:30] (current)
martins-v updating dummy module (ZBX-17109)
Line 236: Line 236:
 /* /*
 ** Zabbix ** Zabbix
-** Copyright (C) 2001-2016 Zabbix SIA+** Copyright (C) 2001-2020 Zabbix SIA
 ** **
 ** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify
Line 253: Line 253:
 **/ **/
  
-#​include ​"​sysinc.h"+#​include ​<stdlib.h
 +#include <​string.h>​ 
 +#include <​time.h>​ 
 +#include <​stdint.h>​ 
 #include "​module.h"​ #include "​module.h"​
  
Line 352: Line 356:
  ​* ​             request->​key - item key without parameters ​                   *  ​* ​             request->​key - item key without parameters ​                   *
  ​* ​             request->​nparam - number of parameters ​                       *  ​* ​             request->​nparam - number of parameters ​                       *
- ​* ​             request->​timeout - processing should not take longer than     * 
- ​* ​                                this number of seconds ​                    * 
  ​* ​             request->​params[N-1] - pointers to item key parameters ​       *  ​* ​             request->​params[N-1] - pointers to item key parameters ​       *
 + ​* ​             request->​types[N-1] - item key parameters types: ​             *
 + ​* ​                 REQUEST_PARAMETER_TYPE_UNDEFINED (key parameter is empty) *
 + ​* ​                 REQUEST_PARAMETER_TYPE_ARRAY (array) ​                     *
 + ​* ​                 REQUEST_PARAMETER_TYPE_STRING (quoted or unquoted string) *
  ​* ​                                                                           *  ​* ​                                                                           *
  ​* ​            ​result - structure that will contain result ​                   *  ​* ​            ​result - structure that will contain result ​                   *
Line 365: Line 371:
  ​* ​         parameter starting from 0 (first parameter). Make sure it exists ​ *  ​* ​         parameter starting from 0 (first parameter). Make sure it exists ​ *
  ​* ​         by checking value of request->​nparam. ​                            *  ​* ​         by checking value of request->​nparam. ​                            *
 + ​* ​         In the same manner get_rparam_type(request,​ N-1) can be used to   *
 + ​* ​         get a parameter type.                                             *
  ​* ​                                                                           *  ​* ​                                                                           *
  ​******************************************************************************/​  ​******************************************************************************/​
Line 382: Line 390:
  param2 = get_rparam(request,​ 1);  param2 = get_rparam(request,​ 1);
  
- /* there is no strict validation of parameters for simplicity sake */+ /* there is no strict validation of parameters ​and types for simplicity sake */
  from = atoi(param1);​  from = atoi(param1);​
  to = atoi(param2);​  to = atoi(param2);​