Tool for mass import of hosts into Zabbix (and other API functions)

Overview

zabbix-tools

A CLI tool for interacting with Zabbix API built in Rust. Designed for Zabbix 6.0.

Functions added to test API and add hosts manually or via .csv file. Assumes SNMPv2 and a number of other host settings. See /cfg/hosts.csv for the fields that can be adjusted.

Instructions

Build using cargo from project root directory:

cargo build

Executable will be located in /target/debug/.

Copy the config.json file from /cfg/ into the the folder from which you run the executable. Modify with your server connection details. API token is not required for testing API.

For .csv import, copy the hosts.csv template from /cfg/ into your root folder and modify and add hosts as needed. The current template must be used as is. Adding extra columns will result in an error.

You can post your own JSON request by copying /cfg/request.json to the root directory and entering a valid request. Be sure to update the auth key.

Note: Syntax and requirements for Zabbix API seem to change with each version so this may not work for versions other than 6.0 See the Zabbix manual for details: https://www.zabbix.com/documentation/6.0/en/manual/api.

To-do

Allow for other host settings to be changed such as interface type.

Convert static JSON value text to struct - both work with serde_json but struct will look cleaner and be less error prone.

Prompt for manual input if config.json is not found or contents are invalid (i.e. if initial API test fails or structure cannot be instantiated).

Add additional delimiter inside GroupID and TemplateID. Currently each device can only be assigned one group and template ID each when added.

Better error handling and debug information for reading in config and hosts files.

Unicode conversion - Zabbix uses \u for formatting unicode for API calls (for example, \u9752 = 青).

Fix unused results and excess mutables.

Other API functions

You might also like...
Transform jsx/tsx files to reactive views in js/ts to use in Web Components, insert into DOM or integrate with other libraries/frameworks
Transform jsx/tsx files to reactive views in js/ts to use in Web Components, insert into DOM or integrate with other libraries/frameworks

viewmill Features | Installation | Getting Started | Notes | Examples viewmill is aimed to create complex UIs from a simple form of JSX. It statically

Navigating around TUM with excellence – An API and website to search for rooms, buildings and other places
Navigating around TUM with excellence – An API and website to search for rooms, buildings and other places

NavigaTUM NavigaTUM is a non-official tool developed by students for students, that aims to help you get around at TUM. Feel free to contribute. Featu

Tool that mirrors questions and resolutions from other forecasting platforms to Manifold.

Tool that mirrors questions and resolutions from other forecasting platforms to Manifold. Managram commands People can interact with the bot by sendin

Downloads and provides debug symbols and source code for nix derivations to gdb and other debuginfod-capable debuggers as needed.

nixseparatedebuginfod Downloads and provides debug symbols and source code for nix derivations to gdb and other debuginfod-capable debuggers as needed

Api testing tool made with rust to use for api developement (Kind of Tui)
Api testing tool made with rust to use for api developement (Kind of Tui)

Api testing tool made with rust to use for api developement (Kind of Tui) This Rust project provides a simple yet powerful tool for making HTTP reques

Captures packets and streams them to other devices. Built for home network analysis and A&D CTFs.

🍩 shiny-donut shiny-donut is a packet capture app that supports streaming packets from a remote system to another device. The main use for this is to

Mercy is a public Rust crate created to assist with building cybersecurity frameworks, assessment tools, and numerous other projects
Mercy is a public Rust crate created to assist with building cybersecurity frameworks, assessment tools, and numerous other projects

Mercy 📚 Documentation Mercy is a public Rust crate created to assist with building cybersecurity frameworks, assessment tools, and numerous other pro

Mercy is a public Rust crate created to assist with building cybersecurity frameworks, assessment tools, and numerous other projects
Mercy is a public Rust crate created to assist with building cybersecurity frameworks, assessment tools, and numerous other projects

Mercy 📚 Documentation Mercy is a public Rust crate created to assist with building cybersecurity frameworks, assessment tools, and numerous other pro

Owner
null
locdev is a handy CLI tool that simplifies the process of adding, removing, and listing entries in the hosts file.

locdev ??️ locdev is a handy CLI tool that simplifies the process of adding, removing, and listing entries in the hosts file. You no longer need to de

Nick Rempel 20 Jun 5, 2023
Tool and framework for securely reading untrusted USB mass storage devices.

usbsas is a free and open source (GPLv3) tool and framework for securely reading untrusted USB mass storage devices. Description Following the concept

CEA IT Security 250 Aug 16, 2023
CLI tool for mass tweet deletion

Damae Damae is a simple CLI tool for mass-deleting tweets. Its name comes from the Latin phrase "damnatio memoriae", which means "condemnation of memo

null 3 Jan 30, 2022
Striving to create a great Application with full functions of learning languages by ChatGPT, TTS, STT and other awesome AI models

Striving to create a great Application with full functions of learning languages by ChatGPT, TTS, STT and other awesome AI models, supports talking, speaking assessment, memorizing words with contexts, Listening test, so on.

null 155 Apr 20, 2023
🐙 Loads config and hosts for gh CLI in Rust.

gh-config-rs Loads config and hosts for gh CLI in Rust. Getting started [dependencies] gh-config = "0.2" Usage use std::error::Error; use gh_config::*

Naoki Ikeguchi 2 Jul 23, 2022
Kubernetes operator for declaratively deploying wasmCloud applications (via wadm) and hosts on Kubernetes.

wasmcloud-operator An operator for managing a set of wasmCloud hosts running on Kubernetes and manage wasmCloud applications using wadm. The goal is t

wasmcloud 11 May 1, 2024
command line tools for coprolite research (paleontology and archaeology): estimate the producer's body mass based on coprolite diameter by the use of regression models

OVERVIEW OF COPROSIZE coprosize employs power, exponential and cubic regression models allowing to estimate the producer's body mass based on coprolit

Piotr Bajdek 7 Nov 25, 2022
rewrite of hosts-creator in rust

hc-rs -> hosts-creator-rust fetch and merge multiple hosts files this is a WIP whats done fetching hosts files merging hosts files removing duplicate

null 2 Nov 20, 2022
Detect polymer contaminants in mass spectra.

?? mzsniffer ?? Detect polymer contaminants in mass spectra. Introduction Mzsniffer is a command line application to quickly detect common polymer con

Will Fondrie 4 Mar 13, 2023
Turbine is a toy CLI app for converting Rails schema declarations into equivalent type declarations in other languages.

Turbine Turbine is a toy CLI app for converting Rails schema declarations into equivalent type declarations in other languages. It’s described as a to

Justin 2 Jan 21, 2022