Skip to content

Information for developing Hatohol

cosmo0920 edited this page Dec 2, 2014 · 2 revisions

Linux distros to build hatohol

Following Linux distributions are frequently.

  • Ubuntu 12.04 LTS (64bit)
  • Ubuntu 14.04 LTS (64bit) [Officially supported]
  • CentOS 6.5 (x86_64) [Officially supported]

Dependent Libraries

  • GLib (EventLoop, helper functions)
  • libsoup (To offer REST API and access to HTTP server)
  • json-glib (To parse and create JSON string with GLib's fashion)
  • SQLite3
  • MySQL
  • STL (list, vector, map, set, ...)

Hatohol components

[Hatohol Server](Hatohol server technical information)

A daemon process that is in charge of the following functions.

  • Gets data from monitoring servers such as Zabbix Server and Nagios.
    • This function will be taken over by arm plugin (described below).
  • Stores obtained monitoring data to DB (SQLiet3).
    • We call the stored data cache because the original data is in Zabbix Server or Nagios (NDOUtils) DB and we can get it again.
    • The reason why we use SQLite3 is fast when it is used from the local host and a single process.
    • However, it's hard to use SQLite3 from multiple processes on several computers. We will divide hatohol server into some servers to increase availability and scalability. So we may make a decision to do away with SQLite3.
  • Provides REST API including two kinds of functions.
    1. Service of (unified) monitoring data.
    2. Configuring Hatohol itself such as target servers, accounts, actions and so on.

[Hatohol client (frontend)](Hatohol frontend (web) technical information)

Arm Plugin

  • A process for getting data from monitoring servers.
    • Currently experimental plugin for Zabbix (hatohol-arm-plugin-zabbix) is included in 14.06
  • Arm Plugin communicates with Hatohol server via HAPI (Hatohol Arm Plugin Interface)

Provides fundamental helper functions such as Time, Concurrency (Semaphore, MutexLock...), Logging, String, etc.

Coding convention

See CodingConvention.txt on the top directory.

Unit test

MLPL, Hatohol server, and ArmPlugin

  • Cutter: A test framework for C and C++.

For more information, see server/test/README.

Hatohol client

Test is performed on PhantomJS (a headless browser) without GUI environment.

We can also do the test with normal browsers such as Firefox and Google Chrome.

For more information, see client/HowToTest.md.

TravisCI

When local changes are pushed to GitHub, the above tests are automatically executed on TravisCI. The status and the results can be seen with a web browser like this.

When the test fails, TravisCI sends an email according to the setting. (currently sourceforge.net's hatohol-commit)

For more details. see .travis.yaml on the top directory.

Trial environment

Trial environment including Zabbix servers, Nagios, and monitoring targets is prepared as a VM image.

The setup instruction is here.

Commit mail

Everybody can receive commit mails by registered at https://lists.sourceforge.net/lists/listinfo/hatohol-commit.

How to run Hatohol server w/o installing

See the Example section of server/QUICK-REF.md

Documents about internal structure

APIs reference and Class tree can be generated by Doxygen. For more detail, see doc/server/README