Skip to content

Commit

Permalink
Merge branch 'master' into feature_expose_queryhandler
Browse files Browse the repository at this point in the history
  • Loading branch information
sni authored Sep 30, 2024
2 parents dab7a7e + 29c659d commit ce2d7f8
Show file tree
Hide file tree
Showing 76 changed files with 3,316 additions and 781 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/citest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: citest

on:
push:
pull_request:
release:

jobs:
citest:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
#- name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate
# uses: mxschmitt/action-tmate@v3
- name: prepare machine
run: |
sudo apt-get update
sudo apt-get install apt-transport-https
sudo sh -c "echo 'deb [signed-by=/etc/apt/trusted.gpg.d/naemon.asc] http://download.opensuse.org/repositories/home:/naemon:/daily/xUbuntu_$(lsb_release -rs)/ ./' >> /etc/apt/sources.list"
sudo curl -s -o /etc/apt/trusted.gpg.d/naemon.asc "https://build.opensuse.org/projects/home:naemon/signing_keys/download?kind=gpg"
sudo apt-get update
sudo apt-get install autoconf
sudo apt-get install build-essential
sudo apt-get install libcppunit-dev
sudo apt-get install libglib2.0-dev
sudo apt-get install libtool
sudo apt-get install naemon-dev
sudo apt-get install naemon-core
sudo apt-get install ruby ruby-dev
sudo apt-get install zlib1g-dev liblzma-dev patch # required for nokogiri
sudo gem install cucumber:1.3.18 websocket-driver:0.7.0 nokogiri:1.11.0 rack:1.6.5 rack-test:0.7.0 capybara:2.1.0 public_suffix:2.0.5 xpath:2.0 rspec:2.14.1 parallel_tests syntax:1.0.0 cliver:0.3.2
- name: run build
run: |
autoreconf -i
./configure
make
- name: run tests
run: |
make check || exit 1
export PATH="$PATH:$(pwd)/tests/tools"
export CUKE_UNIXCAT_PATH=$(pwd)/src/unixcat
export CUKE_LIVESTATUS_PATH=$(pwd)/src/.libs/livestatus.so
cucumber ./tests -t ~@skip -t ~@unreliable --strict || exit 1
LIVESTATUS_TCP=1 cucumber ./tests -t ~@skip -t ~@unreliable --strict || exit 1
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This is a fork of MK Livestatus, part of Check_MK, that is being maintained
by naemon. See http://naemon.org to learn more about us.
by naemon. See https://www.naemon.io to learn more about us.

Check_MK was invented and implemented by Mathias Kettner
<[email protected]>.
Expand Down
44 changes: 21 additions & 23 deletions COPYING
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA.
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble
Preamble

The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Expand All @@ -16,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.

When we speak of free software, we are referring to freedom, not
Expand Down Expand Up @@ -56,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE

GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains
Expand Down Expand Up @@ -111,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
Expand Down Expand Up @@ -169,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
Expand Down Expand Up @@ -226,7 +225,7 @@ impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
Expand Down Expand Up @@ -256,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

NO WARRANTY
NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
Expand All @@ -278,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
Expand All @@ -292,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
Copyright (C) <year> <name of author>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -304,17 +303,16 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand All @@ -337,5 +335,5 @@ necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
14 changes: 14 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ EXTRA_DIST = naemon-livestatus.spec \
naemon-livestatus.rpmlintrc \
api \
debian \
version.sh \
livestatus.cfg.in

naemonconf_DATA = livestatus.cfg
Expand All @@ -43,3 +44,16 @@ rpm: dist

deb:
debuild -i -us -uc -b

version:
[ -e .git ] || { echo "changing versions only works in git clones!"; exit 1; }
[ `git status | grep -cP 'working (directory|tree) clean'` -eq 1 ] || { echo "git project is not clean, cannot tag version"; exit 1; }
OLDVERSION=$(shell grep ^VERSION version.sh | awk -F = '{ print $$2}'); \
NEWVERSION=$$(dialog --stdout --inputbox "New Version:" 0 0 "$$OLDVERSION"); \
if [ -n "$$NEWVERSION" ] && [ "$$NEWVERSION" != "$$OLDVERSION" ]; then \
sed -ri "s/$$OLDVERSION/$$NEWVERSION/" version.sh naemon-livestatus.spec; \
sed -e 's/UNRELEASED/unstable/g' -i debian/changelog; \
DEBFULLNAME="Naemon Development Team" DEBEMAIL="Naemon Development <[email protected]>" dch --newversion "$$NEWVERSION" --package "naemon-livestatus" -D "UNRELEASED" --urgency "low" "new upstream release"; \
sed -e 's/unstable/UNRELEASED/g' -i debian/changelog; \
fi

8 changes: 3 additions & 5 deletions README
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
This is a fork of Mattias Kettner's mk_livestatus. It has been ported to
Naemon by OP5 and contains some extra features such as sorting and page offsets.
This branch is being maintained by the Naemon team until such a time
comes when everything we need has been merged back upstream.
Naemon and contains some extra features such as sorting and page offsets.

To find out more about mk_livestatus, see
http://mathias-kettner.de/checkmk_livestatus.html
http://www.naemon.io/documentation/usersguide/livestatus.html

=== Differences between mk_livestatus and naemons fork of livestatus ===

Expand Down Expand Up @@ -48,7 +46,7 @@ The result set is packed in a json object, with a couple of possible fields:

=== About Naemon ===

To find out more about Naemon, see http://naemon.org
To find out more about Naemon, see https://www.naemon.io

=== INSTALL ===

Expand Down
27 changes: 19 additions & 8 deletions api/python/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
from livestatus import SingleSiteConnection, MultiSiteConnection, MKLivestatusException, MKLivestatusSocketError, MKLivestatusSocketClosed, MKLivestatusQueryError, MKLivestatusNotFoundError
from __future__ import absolute_import
from .livestatus import (
SingleSiteConnection,
MultiSiteConnection,
MKLivestatusException,
MKLivestatusSocketError,
MKLivestatusSocketClosed,
MKLivestatusQueryError,
MKLivestatusNotFoundError,
)

__all__ = [
'SingleSiteConnection',
'MultiSiteConnection',
'MKLivestatusException',
'MKLivestatusSocketError',
'MKLivestatusSocketClosed',
'MKLivestatusQueryError',
'MKLivestatusNotFoundError']
"SingleSiteConnection",
"MultiSiteConnection",
"MKLivestatusException",
"MKLivestatusSocketError",
"MKLivestatusSocketClosed",
"MKLivestatusQueryError",
"MKLivestatusNotFoundError",
]
Loading

0 comments on commit ce2d7f8

Please sign in to comment.