https://github.com/starryshark/deno-zabbix
Zabbix API Client for JavaScript/TypeScript Deno Runtime.
https://github.com/starryshark/deno-zabbix
deno deno-module typescript zabbix zabbix-api zabbix-sender
Last synced: 29 days ago
JSON representation
Zabbix API Client for JavaScript/TypeScript Deno Runtime.
- Host: GitHub
- URL: https://github.com/starryshark/deno-zabbix
- Owner: StarryShark
- License: mit
- Created: 2020-08-10T04:15:23.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-19T06:15:50.000Z (over 5 years ago)
- Last Synced: 2026-04-13T17:34:48.005Z (2 months ago)
- Topics: deno, deno-module, typescript, zabbix, zabbix-api, zabbix-sender
- Language: TypeScript
- Homepage: https://deno.land/x/zabbix
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# deno-zabbix
Zabbix is an open-source monitoring software that monitors almost everything like networks, servers, applications, etc. You may learn more about Zabbix at [www.zabbix.com](https://www.zabbix.com/).
**Deno-Zabbix** is a [Deno](https://deno.land) module for JavaScript/TypeScript runtime environment to interact with Zabbix APIs. There are no third-party module dependencies.
## Table of Contents
- [Usage](#usage)
- [Examples](#examples)
- [Contributing](#contributing)
- [License](#license)
## Usage
Please make necessary changes in `url`, `user`, and `password` below and save it in a file `getHost.ts`. The example below is implicitly using the latest version of `deno-zabbix` module.
```ts
import { Zabbix } from "https://deno.land/x/zabbix/mod.ts";
const zabbix: Zabbix = new Zabbix({
url: "http://127.0.0.1/api_jsonrpc.php",
user: "Admin",
password: "zabbix",
});
const main = async () => {
try {
await zabbix.login()
const host = await zabbix.request('host.get', {
selectInterfaces: 'extend',
limit: 1
})
console.log(JSON.stringify(host, null, 2))
zabbix.logout()
} catch (error) {
console.error(error)
}
}
main()
```
Run the program:
```shell
deno run --allow-net getHost.ts
```
## Examples
Please check the examples below to get started.
- [getHost](examples/getHost.ts)
## Contributing
👋Thanks for thinking about contributing to `deno-zabbix`! Please check out [CONTRIBUTING.md](CONTRIBUTING.md).
## License
[MIT](LICENSE)
Copyright (c) 2020 Sumit Goel.