Skip to content

SamOrlando/zabbixapi-lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

zabbixapi-lua

Lua Interface for Zabbix API

Additional Requirements:

  • socket.http
  • cjson

Features:

  • Hook features for calling outside functions on request calls.

Reference:

  • zbxapi (table) - Primary table space for api system
  • zbxapi.create(url, username, password) [returns table(meta)]
  • self:IsAuthenticated()
  • self:Disable()
  • self:Enable()
  • self:ClearAuthToken()
  • self:Authorize(user, password)
  • self:GetAuthToken()
  • self:Request(method, parms, id)
  • self:AddRequestHook(id, method, function, args(...)) *note: "all" is valid method name for any and all request method calls.
  • self:RemoveRequestHook(id, method)
  • self:RunRequestHook(method, payload, results) [Should not be called by user)

Example:

local mysrv = zbxapi.create("http://10.10.10.10/", "woot", "myneetpassword")

local results = mysrv:Request("host.get", {hostids = {11451}})

About

Lua Interface for Zabbix API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages