Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guicaulada/jszabbix
Javascript Zabbix API inspired by PyZabbix
https://github.com/guicaulada/jszabbix
Last synced: about 1 month ago
JSON representation
Javascript Zabbix API inspired by PyZabbix
- Host: GitHub
- URL: https://github.com/guicaulada/jszabbix
- Owner: guicaulada
- License: gpl-3.0
- Created: 2019-02-01T18:22:33.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-28T15:35:45.000Z (over 5 years ago)
- Last Synced: 2024-10-08T09:01:13.481Z (3 months ago)
- Language: JavaScript
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jsZabbix #
**jsZabbix** is a Javascript module for working with the [Zabbix API](https://www.zabbix.com/documentation/3.0/manual/api/reference) inspired
by [PyZabbix](https://github.com/lukecyca/pyzabbix).## Requirements
* Tested against Zabbix 1.8 through 4.0
* For Node.js you will need the [xmlhttprequest](https://www.npmjs.com/package/xmlhttprequest) library.## Documentation ##
### Getting StartedIf you are using Node.js, install jsZabbix using npm:
```bash
$ npm install jszabbix
```You can now require and use jszabbix like so:
```js
let ZabbixAPI = require('jszabbix')const ZABBIX_URL = process.env.ZABBIX_URL
const ZABBIX_USER = process.env.ZABBIX_USER
const ZABBIX_PASS = process.env.ZABBIX_PASSlet zapi = new ZabbixAPI(ZABBIX_URL)
zapi.login(ZABBIX_USER, ZABBIX_PASS).then(async (data) => {
console.log(await zapi.host.get())
})
```Refer to the [Zabbix API Documentation](https://www.zabbix.com/documentation/3.0/manual/api/reference) and the [jsZabbix Examples](https://github.com/Sighmir/jsZabbix/tree/master/examples) for more information.
### Browser
You can also load this script on your browser like so:
```html
```
You can now use the class ZabbixAPI normally on the page, like you would on Node.js.
## License ##
```
jsZabbix - Zabbix API Javascript Library.
Copyright (C) 2019 Guilherme Caulada (Sighmir)This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program. If not, see .
```