Code Monkey home page Code Monkey logo

zabbix-scripts's People

Contributors

bmanojlovic avatar manusfreedom avatar maxxer avatar mrdumpty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zabbix-scripts's Issues

The discovery script generates bad JSON on Ubuntu 14

The discovery script generates bad JSON on Ubuntu 14:

# ./zbx_zimbra.sh discover
{
-e  "data":[

Changing the shell to /bin/bash makes it work correctly:

root@zimbra:~/zabbix-scripts/zabbix-zimbra# diff -u zbx_zimbra.sh /etc/zabbix/scripts/zbx_zimbra.sh 
--- zbx_zimbra.sh   2016-03-29 22:16:55.355327161 +0000
+++ /etc/zabbix/scripts/zbx_zimbra.sh   2016-03-30 17:59:51.107397777 +0000
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash

Thanks

Zabbix 3.2 Value should be a JSON object

Hello, Im using the latest version of this script however Im getting the discovery error in Zabbix "Value should be a JSON object".

Zabbix Server 3.2, centos 7

Output from Zimbra node:

[root@mail ~]# /etc/zabbix/scripts/zbx_zimbra.sh version
Release 8.6.0_GA_1153.RHEL6_64_20141215151155 RHEL6_64 FOSS edition, Patch 8.6.0_P7.

[root@mail ~]# /etc/zabbix/scripts/zbx_zimbra.sh discover
{
        "data":[

{ "{#ZIMBRASERVICE}":"amavis" }, { "{#ZIMBRASERVICE}":"antispam" }, { "{#ZIMBRASERVICE}":"antivirus" }, { "{#ZIMBRASERVICE}":"ldap" }, { "{#ZIMBRASERVICE}":"logger" }, { "{#ZIMBRASERVICE}":"mailbox" }, { "{#ZIMBRASERVICE}":"memcached" }, { "{#ZIMBRASERVICE}":"mta" }, { "{#ZIMBRASERVICE}":"opendkim" }, { "{#ZIMBRASERVICE}":"proxy" }, { "{#ZIMBRASERVICE}":"service webapp" }, { "{#ZIMBRASERVICE}":"snmp" }, { "{#ZIMBRASERVICE}":"spell" }, { "{#ZIMBRASERVICE}":"stats" }, { "{#ZIMBRASERVICE}":"zimbra webapp" }, { "{#ZIMBRASERVICE}":"zimbraAdmin webapp" }, { "{#ZIMBRASERVICE}":"zimlet webapp" }, { "{#ZIMBRASERVICE}":"zmconfigd" }

        ]

}

[root@mail ~]# /etc/zabbix/scripts/zbx_zimbra.sh amavis
1

I also tested the above json on https://jsonlint.com/ and it confirms to be valid. However discovery fails in Zabbix.

Please advise how I can fix this.
Thanks.

Zabbix mail queues

In Centos 7, mailq was in different directory, maybe you can mention that in readme :) I used locate to find it.

/opt/zimbra/postfix-2.11.1.2z/sbin/mailq

network error when retreiving service status

After i installed the scripts on our zimbra server and configured them, i had the following issue: the json file was wrongly parsed to the zabbix server and i fixed the json to a static file.

After this, the services get discovered on the zabbix server but it couldn't retreive all the data. It tries to pull the data through the passive agent, but it keeps generating errors and won't retrieve all the data. From the 18 services it can only find 12 on start from the zabbix agent and it can only sync 4 services

code from the error log on the zabbix server(debug level 3):

8582:20161105:174049.096 Zabbix agent item "zimbra.status[amavis]" on host "mail.phasehosting.io" failed: first network error, wait for 15 seconds 8590:20161105:174104.321 resuming Zabbix agent checks on host "mail.phasehosting.io": connection restored

this keeps repeating every 2 mins, like the item interval is configured.

in zabbix on the latest data following appears(its visible only couple services gets checked):

zimbraservices

I tried changing the pollers and discoverers on the server and agent listerners on the agent to higher values, without effect.I tried changing the timeout value in the zabbix_agentd.d/yo-zimbra.conf file without effect. I also tried to change timeout values in server and agent files but due i am new to zabbix i don't know which has the most effect.

user NOT in sudoers

Hi
Currently trying out the script, im not sure if i did this part correctly,
Added the conf into the sudoers folder
running ubuntu 18.04

cp sudo_zbx-zimbra.conf /etc/sudoers.d/

But im getting this error
Invalid discovery rule value: cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'sudo: no tty present and no askpass program specified'

Thank you

Sudoers.d

sudo_zbx-zimbra.conf won't work with extension .conf. At least in Centos 7.
And it need to be created like that "sudo visudo -f /etc/sudoers.d/sudo_zbx-zimbra", so it will be created with correct permissions. You can update readme :)
And i changed "Cmnd_Alias ZIMBRA_BIN_ZABBIX = /opt/zimbra/bin/zmcontrol status, /opt/zimbra/bin/zmcontrol -v" line, that it cant stop services accidentally.

From manual:
sudo will read each file in /etc/sudoers.d, skipping file names that end in ‘~’ or contain a ‘.’ character to avoid causing problems with package manager or editor temporary/backup files.

"value should be a json object"

Hi, first thanks for the script.

I Installed the script, the version is reported to Zabbix but the discovery are not working and I get the error "value should be a json object"

When I execute the script /etc/zabbix/scripts/zbx_zimbra.sh discover I get:
{
-e "data":[

{ "{#ZIMBRASERVICE}":"amavis" },
{ "{#ZIMBRASERVICE}":"antispam" },
{ "{#ZIMBRASERVICE}":"antivirus" },
{ "{#ZIMBRASERVICE}":"dnscache" },
{ "{#ZIMBRASERVICE}":"memcached" },
{ "{#ZIMBRASERVICE}":"mta" },
{ "{#ZIMBRASERVICE}":"opendkim" },
{ "{#ZIMBRASERVICE}":"proxy" },
{ "{#ZIMBRASERVICE}":"snmp" },
{ "{#ZIMBRASERVICE}":"stats" }
-e
]
}

Error JSON Discover

Hi,

Discover with error.

After update:

{
\t"data":[\n
{ "{#ZIMBRASERVICE}":"amavis" }, { "{#ZIMBRASERVICE}":"ldap" }, { "{#ZIMBRASERVICE}":"logger" }, { "{#ZIMBRASERVICE}":"mailbox" }, { "{#ZIMBRASERVICE}":"mta" }, { "{#ZIMBRASERVICE}":"service webapp" }, { "{#ZIMBRASERVICE}":"snmp" }, { "{#ZIMBRASERVICE}":"spell" }, { "{#ZIMBRASERVICE}":"stats" }, { "{#ZIMBRASERVICE}":"zimbra webapp" }, { "{#ZIMBRASERVICE}":"zimbraAdmin webapp" }, { "{#ZIMBRASERVICE}":"zimlet webapp" }, { "{#ZIMBRASERVICE}":"zmconfigd" }
\n\t]\n
}

Before:

{
        "data":[

{ "{#ZIMBRASERVICE}":"amavis" }, { "{#ZIMBRASERVICE}":"ldap" }, { "{#ZIMBRASERVICE}":"logger" }, { "{#ZIMBRASERVICE}":"mailbox" }, { "{#ZIMBRASERVICE}":"mta" }, { "{#ZIMBRASERVICE}":"service webapp" }, { "{#ZIMBRASERVICE}":"snmp" }, { "{#ZIMBRASERVICE}":"spell" }, { "{#ZIMBRASERVICE}":"stats" }, { "{#ZIMBRASERVICE}":"zimbra webapp" }, { "{#ZIMBRASERVICE}":"zimbraAdmin webapp" }, { "{#ZIMBRASERVICE}":"zimlet webapp" }, { "{#ZIMBRASERVICE}":"zmconfigd" }

        ]

}

thanks,

Jhones Petter

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.