Ad Widget

Collapse

zabbix cli frontend

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • limo
    Senior Member
    • Dec 2004
    • 192

    #1

    zabbix cli frontend

    Hello to all,

    I see that many suggestions is to tamplating system and changes of many items. I have similar problems and users which uses zabbix arround me too.

    I am thinking about implementing of zabbix_cli frontend. Let us find the way how to do changes of many items by command similar to select. Select directly into db is not good because there is no integrity check. But maybe there could be some frontend which could do some work for us..
    Maybe like this:

    zabbix_cli create {item|trigger|action} params
    zabbix_cli delete {item|trigger|action} params
    zabbix_cli update {item|trigger|action} params
    zabbix_cli cleanup {history|alerts|trends} params
    zabbix_cli import {file.xml|image} params
    zabbix_cli export {file.xml|image|history|trends}

    file.xml could be very simple xml like
    <create>
    <item>
    <param>
    <param>
    ...
    </item>
    </create>

    Sorry I am not xml expert. But today it is very hard to make usable items and templates repository. If we have some xml standard, we can do something better and usefull.

    Please tell me what you are thinking about this. I know it is possible to do by bulkloader, but it is very simple now and does not meet all requierements for templates repository.
    Basic question is, if this should be native zabbix part or addon developed externaly.

    Thank you for answers !
    If this could be usefull for somebody, please let me know. I will try to make some basic syntax and put it into wiki.
  • dotelpenguin
    Junior Member
    • Feb 2009
    • 14

    #2
    What I would like is a CLI front end that I can extract events and keys from. I would love to be able to say.

    #zimbra_cli HOST SHOWTRIGGERS
    MAILHOST SMTP DOWN
    WEBHOST HTTP DOWN
    EVILPENGUIN LASER DOWN
    etc

    #zimbra_cli mailserver smtp.up.last(0)
    12

    something like that. If this already exists, please point me in right direction.

    Comment

    • Tenzer
      Senior Member
      • Nov 2007
      • 316

      #3
      The way I see this, is that it either has to be made in PHP, making use of the functions already made for the web frontend, or by using an API which hopefully will be included in a not to distant future.

      Comment

      • NOB
        Senior Member
        Zabbix Certified Specialist
        • Mar 2007
        • 469

        #4
        Originally posted by Tenzer
        The way I see this, is that it either has to be made in PHP, making use of the functions already made for the web frontend, or by using an API which hopefully will be included in a not to distant future.
        you are right.
        This would be the right way of doing it.

        Because we are about to do a migration from a different monitoring
        tool, we would need something like:

        zbx_cli addhostgroup hostgroup-name
        zbx_cli addhost hostgroup-name hostname1 hostname2 hostname3 ...
        zbx_cli usetemplate template-name hostname4 hostname5 hostname6 ...

        etc.

        Regards

        Norbert.

        Comment

        • dotelpenguin
          Junior Member
          • Feb 2009
          • 14

          #5
          has anyone already done this? I do not want to reinvent the rocket powered chariot.

          Comment

          • nelsonab
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2006
            • 1233

            #6
            I agree this is needed. I have talked with Alexei about an API and he says there is work on this, but I have not heard much more. A while ago I created a basic REST interface for Zabbix. My hope was to extend this interface to also manipulate the configuration. From there you could then write some command line scripts and the full power can then be utilised. However I placed that work on hold waiting for Alexei to release more information on the API.

            That was about 2 months ago.

            Bottom line. We need this desperately, however doing so now with the Zabbix team working on an API will cause some incompatabilities later as an API is needed for something like this to work.
            RHCE, author of zbxapi
            Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
            Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

            Comment

            • martin.marcher
              Junior Member
              • Nov 2007
              • 22

              #7
              Having a Zabbix CLI/API (from a sysadmin point of view I don't care that much, but an API would be nicer - definitely) to create hosts would be a really nice start (also to get data out of it).

              I'd even say let me feed data into zabbix over a CLI tool so that I can extract data from arbitrary monitoring source (munin, rrd, $whatever) and feed that to zabbix so that I can keep my historical data...

              Comment

              Working...