]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
contrib: remove suri-graphite
authorVictor Julien <vjulien@oisf.net>
Sun, 9 Mar 2025 14:07:57 +0000 (15:07 +0100)
committerVictor Julien <victor@inliniac.net>
Sun, 9 Mar 2025 20:52:44 +0000 (21:52 +0100)
Built for py2.

Remove now empty contrib dir.

Ticket: #6888.

Makefile.am
configure.ac
contrib/Makefile.am [deleted file]
contrib/suri-graphite [deleted file]

index 20e50bdc4a03addecbf29a4da876028cda53d70a..72b0a5ca0e26de62f8aa13c309f2a275b8ef718f 100644 (file)
@@ -12,7 +12,7 @@ EXTRA_DIST = ChangeLog COPYING LICENSE suricata.yaml.in \
             scripts/docs-ubuntu-debian-minimal-build.sh \
        scripts/evedoc.py \
             examples/plugins
-SUBDIRS = $(HTP_DIR) rust src plugins qa rules doc contrib etc python ebpf \
+SUBDIRS = $(HTP_DIR) rust src plugins qa rules doc etc python ebpf \
           $(SURICATA_UPDATE_DIR)
 DIST_SUBDIRS = $(SUBDIRS) examples/lib/simple
 
index 51b9c95c9746a564daba417b780facb0ec82416f..b13820443e44c8eba511973a2d0db37b5a775d18 100644 (file)
@@ -2541,7 +2541,6 @@ AC_CONFIG_FILES(rust/suricatactl/Makefile rust/suricatactl/Cargo.toml)
 AC_CONFIG_FILES(rust/suricatasc/Makefile rust/suricatasc/Cargo.toml)
 AC_CONFIG_FILES(qa/Makefile qa/coccinelle/Makefile)
 AC_CONFIG_FILES(rules/Makefile doc/Makefile doc/userguide/Makefile)
-AC_CONFIG_FILES(contrib/Makefile)
 AC_CONFIG_FILES(suricata.yaml etc/Makefile etc/suricata.logrotate etc/suricata.service)
 AC_CONFIG_FILES(python/Makefile python/suricata/config/defaults.py)
 AC_CONFIG_FILES(ebpf/Makefile)
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
deleted file mode 100644 (file)
index 9565547..0000000
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_DIST = suri-graphite
diff --git a/contrib/suri-graphite b/contrib/suri-graphite
deleted file mode 100755 (executable)
index beac079..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/env python
-# Copyright (C) 2013, 2015 Eric Leblond <eric@regit.org>
-#
-# You can copy, redistribute or modify this Program under the terms of
-# the GNU General Public License version 3 as published by the Free
-# Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# 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
-# version 3 along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-import suricatasc
-import socket
-import time
-import argparse
-
-have_daemon = True
-try:
-    import daemon
-except:
-    logging.warning("No daemon support available, install python-daemon if feature is needed")
-    have_daemon = False
-
-parser = argparse.ArgumentParser(prog='suri-graphite', description='Export suricata stats to Graphite')
-parser.add_argument('-H', '--host', default='localhost', help='Host running Graphite')
-parser.add_argument('-P', '--port', default=2003, help='Port of Graphite data socket')
-parser.add_argument('-O', '--oneshot', action='store_const', const=True, help='Send one update and exit', default=False)
-parser.add_argument('-D', '--delay', default=10, help='Delay between data dump')
-parser.add_argument('-r', '--root', default='suricata.perf', help='Prefix of data name in Graphite')
-parser.add_argument('-o', '--output', default=None, help='Output stats to a file instead of using Graphite')
-parser.add_argument('socket', help='suricata socket file to connect to',
-                    default="/usr/local/var/run/suricata/suricata-command.socket", nargs='?')
-parser.add_argument('-v', '--verbose', action='store_const', const=True, help='verbose output', default=False)
-if have_daemon:
-    parser.add_argument('-d', '--daemon', default=False, action="store_true", help="Run as unix daemon")
-
-
-args = parser.parse_args()
-
-if args.output:
-    import json
-
-def main_task(args):
-    sc = suricatasc.SuricataSC(args.socket)
-    sc.connect()
-
-    if args.output:
-        logfile = open(args.output, 'a')
-    else:
-        sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-        sck.connect((args.host, int(args.port)))
-
-    while 1:
-        res = sc.send_command("dump-counters")
-        res = res['message']
-        tnow = int(time.time())
-        for thread in res:
-            for counter in res[thread]:
-                if args.output:
-                    data = {"key": "%s.%s" % (thread , counter), "value": res[thread][counter], "time": tnow}
-                    logfile.write(json.dumps(data) + '\n')
-                else:
-                    sck.send("%s.%s.%s %s %d\n" % (args.root, thread , counter, res[thread][counter], tnow))
-                if args.verbose:
-                    print "%s.%s.%s %s %d\n" % (args.root, thread , counter, res[thread][counter], tnow)
-        if args.oneshot:
-            break
-        time.sleep(float(args.delay))
-
-if have_daemon and args.daemon:
-    with daemon.DaemonContext():
-        main_task(args)
-else:
-    main_task(args)