Giter Site home page Giter Site logo

sumitgoelpw / deno-zabbix Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 27 KB

Zabbix API Client for JavaScript/TypeScript Deno Runtime.

Home Page: https://deno.land/x/zabbix

License: MIT License

TypeScript 100.00%
zabbix zabbix-api zabbix-sender deno deno-module typescript

deno-zabbix's Introduction

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.

Deno-Zabbix is a Deno module for JavaScript/TypeScript runtime environment to interact with Zabbix APIs. There are no third-party module dependencies.

Table of Contents

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.

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:

deno run --allow-net getHost.ts

Examples

Please check the examples below to get started.

Contributing

👋Thanks for thinking about contributing to deno-zabbix! Please check out CONTRIBUTING.md.

License

MIT

Copyright (c) 2020 Sumit Goel.

deno-zabbix's People

Contributors

kumari-priya avatar starryshark avatar

Stargazers

 avatar

Watchers

 avatar

deno-zabbix's Issues

Add contributing guide

Please add a contributing guide to the project root for anyone who may want to contribute to this project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.