shinken-monitoring / check_shinken

A Nagios plugin to check the status of Shinken
2 stars 1 forks source link

Upgrade to shinken 2.0 #1

Open DessaiImrane opened 10 years ago

DessaiImrane commented 10 years ago

Hi,

I don't know if this check is still useful against System->Shinken State, but it should be upgraded to shinken 2.0.

What do you think ?

Frescha commented 10 years ago

of cource. If you like you can migrate the check to Shinken 2.0. We are always looking for new maintainers :smiley:

DessaiImrane commented 10 years ago

ok i ll try Le 20 févr. 2014 18:33, "Andreas Karfusehr" notifications@github.com a écrit :

of cource. If you like you can migrate the check to Shinken 2.0. We are always looking for new maintainers [image: :smiley:]

Reply to this email directly or view it on GitHubhttps://github.com/shinken-monitoring/check_shinken/issues/1#issuecomment-35626471 .

DessaiImrane commented 10 years ago

I need some help to begin.

How to connect to daemon. The script use pyro.

I should replace it by curl, i guess.

Is there some code in the core that can help ?

If things are cool, i just have to change line 142, no ?

naparuba commented 10 years ago

Try to import shinken.http_client :)

On Fri, Feb 21, 2014 at 12:43 PM, DessaiImrane notifications@github.comwrote:

I need some help to begin.

How to connect to daemon. The script use pyro.

I should replace it by curl, i guess.

Is there some code in the core that can help ?

If things are cool, i just have to change line 142, no ?

Reply to this email directly or view it on GitHubhttps://github.com/shinken-monitoring/check_shinken/issues/1#issuecomment-35723821 .

DessaiImrane commented 10 years ago

Ok,

IS Testing 'ping' enough to check if service is ok ?

result =con.get('ping')

 if result:
        if result=='alive':
            print 'OK - ', daemon_name, 'alive'
            raise SystemExit(OK)
        else:
            print 'CRITICAL -', daemon_name, ' down'
            raise SystemExit(CRITICAL)
    else:
        print 'UNKNOWN - %s status could not be retrieved' % daemon_name
        raise SystemExit(UNKNOWN)

Or does arbiter still have status of all services ?

naparuba commented 10 years ago

yes, you won't have more data currently. More to come in 2.2 I hope, but currently only ping is ok

On Fri, Feb 21, 2014 at 2:22 PM, DessaiImrane notifications@github.comwrote:

Ok,

IS Testing 'ping' enough to check if service is ok ?

result =con.get('ping')

if result: if result=='alive': print 'OK - ', daemon_name, 'alive' raise SystemExit(OK) else: print 'CRITICAL -', daemon_name, ' down' raise SystemExit(CRITICAL) else: print 'UNKNOWN - %s status could not be retrieved' % daemon_name raise SystemExit(UNKNOWN)

Reply to this email directly or view it on GitHubhttps://github.com/shinken-monitoring/check_shinken/issues/1#issuecomment-35729611 .

DessaiImrane commented 10 years ago

thanks.

i created a branch to migrate this script to 2.0 i commited a working script in it feel free to make any suggestion Le 21 févr. 2014 19:45, "Gabès Jean" notifications@github.com a écrit :

yes, you won't have more data currently. More to come in 2.2 I hope, but currently only ping is ok

On Fri, Feb 21, 2014 at 2:22 PM, DessaiImrane <notifications@github.com

wrote:

Ok,

IS Testing 'ping' enough to check if service is ok ?

result =con.get('ping')

if result: if result=='alive': print 'OK - ', daemon_name, 'alive' raise SystemExit(OK) else: print 'CRITICAL -', daemon_name, ' down' raise SystemExit(CRITICAL) else: print 'UNKNOWN - %s status could not be retrieved' % daemon_name raise SystemExit(UNKNOWN)

Reply to this email directly or view it on GitHub< https://github.com/shinken-monitoring/check_shinken/issues/1#issuecomment-35729611

.

Reply to this email directly or view it on GitHubhttps://github.com/shinken-monitoring/check_shinken/issues/1#issuecomment-35742098 .

DessaiImrane commented 10 years ago

Need some people to test the script in branch 2.0 so that we can merge to master.

What do you think ?

olivierHa commented 10 years ago

I am on it ;) Le 17 avr. 2014 12:30, "DessaiImrane" notifications@github.com a écrit :

Need some people to test the script in branch 2.0 so that we can merge to master.

What do you think ?

— Reply to this email directly or view it on GitHubhttps://github.com/shinken-monitoring/check_shinken/issues/1#issuecomment-40700937 .