Git Product home page Git Product logo

alignak's Introduction

Presentation of the Alignak project

Alignak - modern Nagios compatible monitoring framework

Master branch build status Develop branch build status Codacy Badge codecov

Read the Docs (stable) Read the Docs (develop) Join the chat #alignak on freenode.net Gitter

License AGPL v3

Alignak Project

Alignak is an open source monitoring framework written in Python under the terms of the GNU Affero General Public License.

Its main goal is to give users a flexible and complete solution for their monitoring system. Alignak is designed to scale to large and heterogeneous environments.

The project started in 2015 with a fork of the Shinken project. Since the project creation, we achieved a huge code documentation and cleaning, we tested the application in several environments and developed some new features.

The main idea when developing Alignak is the flexibility which is our definition of framework. We target the following goals:

  • Easy to install: we will always deliver packages (OS and Python) installation. You can install Alignak with OS packages, Python PIP apckages or setup.py directly..

  • Easy for new users: this documentation should help you to discover Alignak. This documentation shows simple use-cases and helps building more complex configurations.

  • Easy to migrate from Nagios: Nagios flat-files configuration and plugins will work with Alignak. We try to keep as much as possible an ascending compatibility with former Nagios configuration...

  • Multi-platform: python is available in a lot of Operating Systems. We try to write generic code to keep this possible. However, Linux and FreeBSD are the most tested OSes so far. As of now, Alignak is tested with Python 2.7, 3.5 and 3.6 versions but will work with Pypy in the future.

  • UTF-8 compliant: whatever you language, we take care of it. We are testing Alignak I/O with several languages and take care of localization.

  • Independent from other monitoring solution: Alignak is a framework that can integrate with other applications through standard interfaces. Flexibility first!

  • Flexible: in an architecture point of view. Alignak may be distributed across several servers, datacenters to suit the monitoring needs and constrints. It is our scalability wish!

  • Easy to contribute: contribution has to be an easy process. Alignak follow pycodestyle (former pep8), pylint and pep257 coding standards to ease code readability. Step by step help to contribute to the project can be found in the documentation.

This is basically what Alignak is made of. May be add the keep it simple Linux principle and it's perfect.

There is nothing we don't want, we consider every features / ideas. Feel free to join by mail or on the IRC #alignak channel to discuss or ask for more information

Documentation

Alignak Web Site includes much documentation and introduces the Alignak main features, such as the Backend, the WebUI, the desktop Applet, the tight integration with timeseries databases, ...

Alignak project has an online documentation site. We try to have as much documentation as possible and to keep this documentation simple and understandable. For sure the documentation is not yet complete, but you can help us ;)

Click on one of the docs badges on this page to browse the documentation.

Requirements

See the requirements file in the repository's root

Installing Alignak

Alignak Deb / Rpm packaging is built thanks to the bintray service. Get the package for your Linux distribution on our packages repositories.

See the installation documentation for more information on the different installation possibilities offered by Alignak.

alignak's People

Contributors

aviau avatar baloo avatar claneys avatar ddurieux avatar dessaiimrane avatar dguenault avatar eherot avatar freddrickk avatar frescha avatar geektophe avatar gst avatar h4wkmoon avatar htgoebel avatar hvad avatar jccomputing avatar jfbutkiewicz avatar jogaulupeau avatar lausser avatar lermit avatar mohierf avatar naparuba avatar olivierha avatar s3v avatar sathieu avatar seb-solon avatar thomascellerier avatar titilambert avatar tvtue avatar vaxvms avatar xkilian 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  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  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

alignak's Issues

Problem with trailing space in the description of a service

Hi,

Here is an example:

define host {
    host_name host-foo
    use       template-with-duplicate-foreach-key
    address   www.xxx.yyy.zzz

    # Key from a "duplicate_foreach" instruction.
    _my_key description n1 $(val1)$ $(val2)$, \
            description n2 $(val1)$ $(val2)$, \
            description n3 $(val1)$ $(val2)$,
}

In this example, the descriptions of the services will be "description n1 ", "description n2 " and "description n3 " with a trailing space in the name which will trigger some problems for instance in the WebUI. Indeed, the WebUI will have some dead links (error 500) such as http://fqdn/service/<host>/<description-of-a-service> (link to a service).

Currently, there is a workaround: just remove the space between the description and the dollar like this:

define host {
    host_name host-foo
    use       template-with-duplicate-foreach-key
    address   www.xxx.yyy.zzz

    # Key from a "duplicate_foreach" instruction.
    _my_key description n1$(val1)$ $(val2)$, \
            description n2$(val1)$ $(val2)$, \
            description n3$(val1)$ $(val2)$,
}

In this case, no problem, the descriptions will be "description n1", "description n2" and "description n3" without the trailing space.

But it should be smarter if the description of a service was systematically striped, ie with desc = desc.strip() somewhere in the code.

Regards.

Feature request : timeperiods broks

Should be interesting to get informed about start and end of the different timeperiods : check period, notification period, ...

As of it, start and end of scheduled downtimes is also interesting

Those new broks will allow to develop many interesting features in external modules.

Dependency with 'shinken' package for modules / plugins / eternal tools ..

Every module does at least "from shinken.modules import BaseModule".
(but each one also import others objects from the shinken package..)

For now : to not be obligated to clone and rename these imports in every module : we can hack sys.modules['shinken'] so that it's an alias for alignak gonna open a PR with this..

Namespace Python

  • Edit setup.py to create the name
  • Add doc to develop a new module
  • Edit module template (dummy_modules)

Linked to #97

fix / clean / rewrite the http_daemon module

IMHO : too complex / code smells / etc..

and there are often problems when shutting down it because it doesn't join/clean the http threads (properly or at all).
plus the module global daemon_inst (declared in http_daemon.py) which is a code smell on its own.

Host 'labels' property not right initialized

In Host class, we have this property :

        'labels':
            StringProp(default=[], fill_brok=['full_status'], merging='join', split_on_coma=True),

It's a string and default can't be [], or default is right [] but type is list, not string

fix/clean wait_for_initial_conf()

it's not anymore valid since the old change from Pyro to http for communication.

if you call it with say 10 : wait_for_initial_conf(10) then you will have to wait 10 secs, even if a new conf is received meanwhile :

def wait_for_initial_conf(self, timeout):
    cur_timeout = timeout
    ...
    elapsed, _, _ = self.handleRequests(cur_timeout)

def handleRequests(self, timeout, suppl_socks=None):
    socks = []
    if suppl_socks:
        socks.extend(suppl_socks)
    ...
    ins = self.get_socks_activity(socks, timeout)

def get_socks_activity(self, socks, timeout):
    if socks == []:
        time.sleep(timeout)
        return []

So wait_for_initial_conf(x) is the same as sleep(x) which is not what is intended..

Automatic comments text should be Alignak ...

... current default author for automatic generated comments is (Nagios process).

When a downtime is programmed an automatic comment is created. The author of this automatic comment is (Nagios Process) ... should use (Alignak) instead ?

What about having parameters in the configuration file for comments author and text ?

[proposal] drop python2.6 support

  1. it's so old
  2. afaik : it's not anymore used as default system python for most of linux distributions,
    even debian stable !!
  3. there are at least some code paths dedicated to it in alignak.. which is not good.
    and when you look more closely at these specific code paths (which unfortunately are not always easily spottable, thx to history..) : you think "what!?"

cpickle vs simplejson

I have seen many performances pages about thi son the web and we can see all result (cpickle > simplesjon and other cpickle < simplejson).

Somebody has made performances tests with both in alignak (currently use cpickle)?

If no, I can try it

clean the `alignak.log` module and its load_obj() "hack"

find a better way to handle the feature that alignak.log.Log.load_obj() permits ..

actually : depending on the conditions, sometimes the load_obj() method is called multiple times, which results in so many ("Brok"-)log handlers being created and attached to the logger.. which can finally be bad because this results in the logs being dispatched multiple times to different "destination" but you are not anymore sure what they are. On its own this can be bad and is almost never desirable (at least as it is right now done).

    def load_obj(self, object, name_=None):
        """ We load the object where we will put log broks
        with the 'add' method
        """
        global _brokhandler_
        _brokhandler_ = BrokHandler(object)
        if name_ is not None or self.name is not None:
            if name_ is not None:
                self.name = name_
            # We need to se the name format to all other handlers
            for handler in self.handlers:
                handler.setFormatter(defaultFormatter_named)
            _brokhandler_.setFormatter(defaultFormatter_named)
        else:
            _brokhandler_.setFormatter(defaultFormatter)
        self.addHandler(_brokhandler_)

the global _brokhandler_ is on its own a code smell here..

Systemd ?

Hi,

I saw in file install_hooks.py this line :

8 def get_init_scripts(config):
9 """ Add init scripts in data_files for install """
10 data_files = config['files']['data_files']
11 if 'win' in sys.platform:
12 pass
13 elif 'linux' in sys.platform or 'sunos5' in sys.platform:
14 data_files = data_files + "\netc/init.d = bin/init.d/*"
15 data_files = data_files + "\netc/default = bin/default/alignak.in"

Can you add code to make it compatible with systemd ?

Thank

héritage de service entre model

Bonjour,

Lorsque que l'on attribue un template de service ping à un template d'hote generic-host et que l'on veut l' utiliser pour un autre template linux le service n'apparait jamais.

Ma configuration pour exemple :
define host{
name generic-host
alias generic-host
check_command check_host_alive
check_interval 5
max_check_attempts 3
active_checks_enabled 1
passive_checks_enabled 0
check_period 24x7
contact_groups +Admin
notification_period 24x7
notification_options d,r
notification_interval 0
realm All
register 0
}

define service{
host_name generic-host
name Ping
service_description Ping
use generic-service
check_command check_fping!3!3000,40%!5000,50%
register 0
}

define host{
name Server-Linux
alias Server-Linux
use generic-host
register 0
_SNMPCOMMUNITY $USER2$
}

Est ce que vous avez déjà eut le problème ?

Merci

Documentation readthedoc

We had discussions about it.
We need to have an unique domain (readthedoc) for multiple types of documentations (on different repositories) like:

We can do this like explained here: https://read-the-docs.readthedocs.org/en/latest/faq.html#how-do-i-host-multiple-projects-on-one-cname

We can have http://alignak.readthedocs.org/en/latest/ where centralize summary and each type of documentation listed before in link (example have http://alignak.readthedocs.org/projects/userdoc/en/latest/)

Add property hostgroup_members in Hostgroup class

When comment modules (pylint), I have seen the function get_hostgroup_members of Hostgroup never works because property 'hostgroup_members' not exist.

So clean it and remove the call in function 'get_hosts_by_explosion' in same class

Doc : Setup devel env

  • Update doc to show how to setup devel env
  • Example to show how to make a test (new structure ?)
  • Review, clarify, simplify and better document the BaseModule

clean the README.rst

bad references missed during rename, and content should be changed regarding installation and so..

Rewrite HA Arbiter algorithm

When arbiter is spare it wait for master death.

Unfortunately, this function (https://github.com/Alignak-monitoring/alignak/blob/develop/alignak/daemons/arbiterdaemon.py#L638) basically only do a sleep(1.0) and never modify the variable used to trigger high availability switch.

Every 300s (master timeout) the spare arbiter will try to run until/unless the master send a HTTP message to say the opposite. This could lead to bad conf dispatched and non wanted monitoring downtime as other satellite would drop their conf and setup the new one. Probability is low because master arbiter is sending the order not to run every loop : https://github.com/Alignak-monitoring/alignak/blob/develop/alignak/dispatcher.py#L191

Wait for master death could be rewritten to really wait for master death instead of basically sleep(300) and being call again and again

Originally reported here : shinken-solutions/shinken#1430 by @andyxning

Remove irrelevant files

Remove some useless file. Go through file and see if we can remove them :

  • contrib
  • cli => To remove
  • for_fedora => See #174
  • libexec => To move ton alignak-contrib org and copy the one needded in test
  • manpage => See #174 (is pbr/pip able ot do that)
  • inventory => To remove
  • external_commands => contrib
  • modules => Remove, done by #90
  • media => To remove
  • var => module

initial_state

Hi,

Arguments initial_state don't work because is not present in alignak code but present in the doc.

Best regard

Queue between broker and modules

It can be nice to keep the queue in the broker, so if queue begin to be big in module and module is killed, for the moment the queue is lost.

We can see how to keep the queue when module killed and wait to restart

daterange test failure currently

gstarck@taf 10:07 $ nosetests -xv test_dateranges.py:TestDataranges.test_weekdaydaterange_start_end_time
test_weekdaydaterange_start_end_time (test_dateranges.TestDataranges) ... FAIL

======================================================================
FAIL: test_weekdaydaterange_start_end_time (test_dateranges.TestDataranges)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gstarck/work/work/SFL/Supervision/alignak/test/test_dateranges.py", line 139, in test_weekdaydaterange_start_end_time
    self.assertEqual(start, ret[0])
AssertionError: 1442203200.0 != 1439179200.0
-------------------- >> begin captured stdout << ---------------------

to be investigated .. probably a "timing" issue I'd say at first.

Separate data to class/functions

I think we need to separate data to class/function.

For exemple, we have

 'contacts': <shinken.objects.contact.Contacts object at 0x808eaa6d0

instead

'contacts' : {'contact_name': 'koinkoin', 'alias': 'koin2'}

The main reasons:

  • read code is more easier
  • have some easier to test functions

Because when call a function we add the data dict in parameter and return a data or the complete dict transformed (depend of cases).

The issue #30 is related to this

For the pylint, we see that we have many problem with variables not initialized, invalid, and others things. There are very lots of problems and I think code this issue before fix pylint can same us lot of time after because the code will be more easier to read and will have less errors in pylint

remove android support

I'd like to clean the project of any reference to android ; which is anyway not fully supported - if something would work at all..

any one wants to raise some cons about this ?

Problem with rotation log

We have rotation log of broker and after no write in this file.

[1432677602] INFO: [broker-master] We are archiving the old log file
[1432677602] INFO: [broker-master] Moving the old log file from /var/log/shinken/shinken.log to /var/log/shinken/archives/shinken-05-26-2015-00.log
[1432677602] DEBUG: [broker-master] I open the log file /var/log/shinken/shinken.lo

daemons other than arbiter try to start even without a config file provided

but, depending on your installation setup, this can miserably fails because of, already, missing stuffs,
like the "working" directory :

gstarck@taf 10:19 $ which python
/home/gstarck/.virtualenvs/test_alignak_pip_install_venv/bin/python
gstarck@taf 10:19 $ alignak-reactionner
...
[1433513984] WARNING: [Alignak] No config file specified, use defaults parameters
...
    raise InvalidWorkDir(e)
InvalidWorkDir: [Errno 2] No such file or directory: '/var/run/alignak'

Traceback (most recent call last):
... 
  File "/home/gstarck/.virtualenvs/test_alignak_install/local/lib/python2.7/site-packages/alignak/daemon.py", line 429, in change_to_workdir
    raise InvalidWorkDir(e)
alignak.http_daemon.InvalidWorkDir: [Errno 2] No such file or directory: '/var/run/alignak'

In this case the alignak was installed within a virtualenv (with pip install .),
but in such a case (virtualenv install) : it would be cool / good if the pip install would have set such default config values to something usable, like : $VIRTUALENV_PATH/var/run/arlignak for this specific setting, the others required default settings could also be set to things usable, like $VIRTUALENV_PATH/var/log/alignak for the logs directory .. etc ..

So that in the virtualenv, the daemons can be directly started AND usable just by calling alignak-scheduler for instance..

To be able to have this feature, the default values for such directives (log dir, run dir, etc..) could be stored in a dedicated module of alignak, say alignak.defaults (and the daemons would import and use that) and just be overhidden by the setup/installation (if needed)..

not really required actually but it would have been made like that since the start that would have been incredible - it's never too late :)

Use "strict" git workflow

I would like to follow the workflow present here : http://nvie.com/posts/a-successful-git-branching-model/ (really worth reading !)

With it : we would/could disable "bare" push of commits to master ; only merge from develop "release" branch would be allowed in master.

master -> THE master branch, should always only point to the last stable released version.
develop -> The branch in which others "dev" branches are merged. Let them be feature or fix branches.

When we would (want to) be in a "freeze period" for preparing the next prod release : git checkout -b release-$x.$y develop and last bug fixes would be merged in this temporary release branch.
Once we assume it's ok : git checkout master && git merge --no-ff release-$x.$y && git tag $x.$y

export to kernel.alignak.io isnot available

Hello,

I am getting this:

[1434467974] ERROR: [Alignak] Cannot find python lib crypto: export to kernel.alignak.io isnot available

Wasn't sending usage statistics disabled in Alignak?

Run all broker modules in external

Il a module has a memory leak, the broker module has so too many memory and is an external module crash, it run again this external process with clone and so with leak memory.

So disable 'internal module'

Roadmap 0.1

Packaging process

Hi,

I'm trying to centralize talk we had about how packaging of Alignak will be implemented.

As far as I remember we stayed on 1 branch for packaging type. Like rpm / debian. So that we don't have packaging file in master/develop.

I can't remember the pros cons of that.

Linked to #91 (remove for fedora maybe)

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.