Ad Widget

Collapse

New to Zabbix: Help With Templates/API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fmtriple
    Junior Member
    • Feb 2015
    • 1

    #1

    New to Zabbix: Help With Templates/API

    I'm in the process of setting up Zabbix to monitor multiple web applications (login & JVM for each app instance) and I need some help putting everything together. I've gotten the login check and JVM monitoring working for a single instance, now I need to create a template of this configuration and use the API to populate the variables/Macros. Below is a high-level overview of what my process will be:

    I have a file with a customer's information that I'll use as a source. Example below:

    Code:
    cust_name: acme
    instance: test
    env: us
    server: test1
    jmx_port: 20000
    user: monitor_user
    pass: password
    I would like to use the API to apply this information to a template. The template will include a login check, jvm monitoring, and a set of triggers for alerts (not HTTP 200, JVM above 90%, etc). Below is a rough idea of what the template will look like for each customer's site, referencing the customer's file information:

    Web Scenario

    Code:
    Name: {cust_name} {instance} Login Check
    Login: https://{cust_name}.myhost.com/login&user={user}&password={pass}
    Logout: https://{cust_name}.myhost.com/logout
    Example Item

    Code:
    Name: {cust_name} {instance} JVM Heap Used
    Type: JMX Agent
    Key: jmx["java.lang:type=Memory",HeapMemoryUsage.used]
    Host Interface: {server}:{jmx_port}
    Example Trigger

    Code:
    Name: 90% mem Heap Memory used on {cust_name} {instance}
    Expression: {{cust_name}:jmx["java.lang:type=Memory",HeapMemoryUsage.used].last(0)}>({{cust_name}:jmx["java.lang:type=Memory",HeapMemoryUsage.max].last(0)}*0.9)
    Questions
    1. Is there a tutorial/guide/etc for what I need to accomplish? Has anyone else setup a similar solution for Web/JVM monitoring using a template, populated via API?
    2. When configuring the template, what method should I use to define the variables that the API will source from the customer file? Should they be Macros? Should they be variables?
    3. There are several ways to group things (Host Groups. Hosts, Application, etc). In my case of multiple customers needing web/JVM checks, how should I group them that makes the most sense? By customer name, customer instances, etc?


    Let me know if you have any questions or if you need things defined further. Any help or guidance would be greatly appreciated!
Working...