Skip to content

Service that load jmx metrics periodically and push to zabbix in one shot

Notifications You must be signed in to change notification settings

n0rad/jmx-zabbix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Maven central

DESCRIPTION:

Service that load jmx metrics periodically and push to zabbix in one shot

REQUIREMENTS:

  • a jmx server to connect to
  • a zabbix server to connect to
  • java >= 7

ATTRIBUTES:

see configuration file example core/src/test/resources/jmx-zabbix.yaml

Build

You need java and maven

$ mvn clean verify

USAGE:

in cli :

$ java -jar jmx-zabbix.jar config.yaml

Or you can include the core library directly in your application :

import java.io.File;
import java.io.FileInputStream;
import org.yaml.snakeyaml.Yaml;
import fr.norad.jmxzabbix.core.JmxToZabbixDaemon;
import fr.norad.jmxzabbix.core.JmxZabbixConfig;

public class Main {

    public static void main(String[] args) throws Exception {
        File configFile = new File("/my/configuration/file.yaml");
        Yaml yaml = new Yaml();
        try (FileInputStream input = new FileInputStream(configFile)) {
            JmxZabbixConfig config = yaml.loadAs(input, JmxZabbixConfig.class);
            JmxToZabbixDaemon jmxToZabbixDaemon = new JmxToZabbixDaemon(config);
            Thread thread = new Thread(jmxToZabbixDaemon);
            thread.setName("jmxzabbix");
            thread.start();
        }

    }

}

About

Service that load jmx metrics periodically and push to zabbix in one shot

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages