https://github.com/vidlec/nodebix
zabbix api library
https://github.com/vidlec/nodebix
api api-client api-wrapper node nodejs zabbix zabbix-api
Last synced: 10 months ago
JSON representation
zabbix api library
- Host: GitHub
- URL: https://github.com/vidlec/nodebix
- Owner: Vidlec
- Created: 2017-05-16T10:57:25.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-16T11:56:36.000Z (almost 9 years ago)
- Last Synced: 2025-04-30T03:47:13.925Z (10 months ago)
- Topics: api, api-client, api-wrapper, node, nodejs, zabbix, zabbix-api
- Language: JavaScript
- Size: 1.28 MB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# nodebix
Nodebix is a API library for zabbix
- Login
- Call API
- Logout
# install
```js
npm install nodebix
```
# example
```js
var zabbix = require("nodebix");
var client = new zabbix("zabbix_url","user","password");
client.login()
.then((result) => {
console.log(result);
return client.call("host.get", {hostids: 20});
})
.then((result) => {
console.log(result);
return client.logout();
})
.then((result) => {
console.log(result);
})
.catch((error) => console.log(error));
```
Result:
```sh
Logged in
{ jsonrpc: '2.0',
result:
[ { hostid: '1',
proxy_hostid: '0',
host: 'someserver',
status: '1',
...
} ],
id: 1 }
Logged out
```