Changeset 304ec80b8cf842fc0abe5f9029790908b6455957

Show
Ignore:
Timestamp:
02/23/15 17:05:32 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1424711132 -0500
git-parent:

[ca956acb73da95ec54d22c710012f669a7cabe03]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1424711132 -0500
Message:

Convert to libmtev.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • configure.in

    r3745843 r304ec80  
    7676DOTSO=.so 
    7777LD_LIBNOIT_VERSION='-Wl,-soname,libnoit.so.$(LIBNOIT_VERSION)' 
    78 LD_LIBNOITLL_VERSION='-Wl,-soname,libnoit-ll.so.$(LIBNOIT_VERSION)' 
    7978 
    8079case $host in 
     
    9190  DOTDYLIB=.dylib 
    9291        LD_LIBNOIT_VERSION='-current_version $(LIBNOIT_VERSION) -install_name $(libdir)/libnoit.$(LIBNOIT_VERSION).dylib' 
    93         LD_LIBNOITLL_VERSION='-current_version $(LIBNOIT_VERSION) -install_name $(libdir)/libnoit-ll.$(LIBNOIT_VERSION).dylib' 
    9492        MODULEEXT=bundle 
    9593        # This is needed for luajit on Mac OS X 
     
    107105        CFLAGS="$CFLAGS" 
    108106        CPPFLAGS="$CPPFLAGS -D_XPG6 -D__EXTENSIONS__" 
    109         MDB_MODS="mdb-support/libnoit.so" 
     107        MDB_MODS= 
    110108        if test "x$GCC" != "xyes" ; then 
    111109        AC_MSG_CHECKING([32 or 64 bit Solaris assembly]) 
     
    196194AC_SUBST(DOTDYLIB) 
    197195AC_SUBST(LD_LIBNOIT_VERSION) 
    198 AC_SUBST(LD_LIBNOITLL_VERSION) 
    199196AC_SUBST(MDB_MODS) 
    200197AC_DEFINE_UNQUOTED(CAP_PLATFORM, "$CAP_PLATFORM", [capabilities platform]) 
     
    349346AC_CHECK_FUNC(xsltParseStylesheetDoc, , [AC_MSG_ERROR(*** libxslt is required ***)]) 
    350347 
    351 LIBNOIT_LIBS=$LIBS 
    352 AC_SUBST(LIBNOIT_LIBS) 
    353  
    354348old_LIBS="$LIBS" 
    355349LIBS="" 
     
    357351        [AC_MSG_ERROR(libprotobuf-c required)]) 
    358352AC_CHECK_LIB(z, compress2, , [AC_MSG_ERROR(*** zlib is required ***)]) 
    359 LIBNOITLL_LIBS=$LIBS 
    360 AC_SUBST(LIBNOITLL_LIBS) 
     353LIBNOIT_LIBS=$LIBS 
     354AC_SUBST(LIBNOIT_LIBS) 
    361355LIBS="$old_LIBS" 
    362356 
     
    371365AC_CHECK_FUNC(TLSv1_2_server_method, [ AC_DEFINE(HAVE_TLSV1_2_SERVER) ]) 
    372366AC_CHECK_FUNC(TLSv1_2_client_method, [ AC_DEFINE(HAVE_TLSV1_2_CLIENT) ]) 
     367 
     368old_LIBS="$LIBS" 
     369old_CFLAGS="$CFLAGS" 
     370AC_CHECK_LIB(yajl, yajl_version, 
     371        [ 
     372                YAJLLIBS="$LIBS" 
     373        ], 
     374        [ AC_MSG_ERROR([libyajl is required for collectd and httptrap modules]) ]) 
     375LIBS=$old_LIBS 
     376CFLAGS=$old_CFLAGS 
     377AC_SUBST(YAJLLIBS) 
    373378 
    374379old_LIBS="$LIBS" 
     
    953958Makefile 
    954959src/Makefile 
    955 src/eventer/Makefile 
    956960src/udns/Makefile 
    957 src/json-lib/Makefile 
    958 src/yajl-lib/Makefile 
    959961src/man/Makefile 
    960962src/modules/Makefile 
    961963src/modules-lua/Makefile 
    962 src/utils/Makefile 
    963 src/noitedit/Makefile 
    964964src/java/Makefile 
    965965src/java/reconnoiter-riemann/run-iep.sh 
  • src/Makefile.dep

    r3745843 r304ec80  
    1  
    2 bundle.pb-c.o bundle.pb-c.lo: bundle.pb-c.c bundle.pb-c.h 
    3  
    4 noit_capabilities_listener.o noit_capabilities_listener.lo: noit_capabilities_listener.c noit_defines.h \ 
    5   noit_config.h noitedit/strlcpy.h noit_version.h eventer/eventer.h \ 
    6   utils/noit_log.h utils/noit_hash.h utils/noit_atomic.h \ 
    7   eventer/eventer_POSIX_fd_opset.h eventer/eventer_SSL_fd_opset.h \ 
    8   eventer/eventer_jobq.h utils/noit_sem.h noit_listener.h \ 
    9   noit_capabilities_listener.h noit_module.h noit_dso.h noit_conf.h \ 
    10   noit_console.h noitedit/histedit.h noit_console_telnet.h \ 
    11   utils/noit_skiplist.h  \ 
    12   utils/noit_hooks.h noit_check.h noit_metric.h noit_xml.h \ 
    13   noit_rest.h noit_http.h json-lib/json.h json-lib/bits.h \ 
    14   json-lib/debug.h json-lib/linkhash.h json-lib/arraylist.h \ 
    15   json-lib/json_util.h json-lib/json_object.h json-lib/json_tokener.h \ 
    16  
    17 noit_check.o noit_check.lo: noit_check.c noit_defines.h noit_config.h \ 
    18   noitedit/strlcpy.h dtrace_probes.h libnoit_dtrace_probes.h \ 
    19   noit_dtrace_probes.h stratcon_dtrace_probes.h utils/noit_memory.h \ 
    20   utils/noit_log.h utils/noit_hash.h utils/noit_skiplist.h \ 
    21   utils/noit_watchdog.h noit_conf.h noit_console.h eventer/eventer.h \ 
    22   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    23   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    24   noitedit/histedit.h noit_console_telnet.h \ 
    25   noit_check.h \ 
    26   utils/noit_hooks.h noit_metric.h noit_module.h noit_dso.h \ 
     1bundle.pb-c.o: bundle.pb-c.c bundle.pb-c.h 
     2noit_check.o: noit_check.c noit_config.h \ 
     3  /opt/circonus/include/mtev_config.h \ 
     4  /opt/circonus/include/mtev_defines.h \ 
     5  /opt/circonus/include/noitedit/strlcpy.h \ 
     6  /opt/circonus/include/eventer/eventer.h \ 
     7  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     8  /opt/circonus/include/mtev_atomic.h \ 
     9  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     10  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     11  /opt/circonus/include/eventer/eventer_jobq.h \ 
     12  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_memory.h \ 
     13  /opt/circonus/include/mtev_skiplist.h \ 
     14  /opt/circonus/include/mtev_watchdog.h \ 
     15  /opt/circonus/include/mtev_conf.h /opt/circonus/include/mtev_console.h \ 
     16  /opt/circonus/include/noitedit/histedit.h \ 
     17  /opt/circonus/include/mtev_console_telnet.h \ 
     18  /usr/local/Cellar/pcre/8.33/include/pcre.h noit_mtev_bridge.h \ 
     19  noit_dtrace_probes.h noit_check.h /opt/circonus/include/mtev_hooks.h \ 
     20  noit_metric.h noit_module.h /opt/circonus/include/mtev_dso.h \ 
    2721  noit_check_tools.h noit_check_tools_shared.h noit_check_resolver.h 
    28  
    29 noit_check_log.o noit_check_log.lo: noit_check_log.c noit_defines.h noit_config.h \ 
    30   noitedit/strlcpy.h dtrace_probes.h libnoit_dtrace_probes.h \ 
    31   noit_dtrace_probes.h stratcon_dtrace_probes.h noit_check.h \ 
    32   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    33   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    34   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    35   utils/noit_skiplist.h utils/noit_hooks.h noit_conf.h noit_console.h \ 
    36   noitedit/histedit.h noit_console_telnet.h \ 
    37   noit_metric.h \ 
     22noit_check_log.o: noit_check_log.c /opt/circonus/include/mtev_defines.h \ 
     23  /opt/circonus/include/mtev_config.h \ 
     24  /opt/circonus/include/noitedit/strlcpy.h noit_dtrace_probes.h \ 
     25  noit_mtev_bridge.h /opt/circonus/include/mtev_log.h \ 
     26  /opt/circonus/include/mtev_hash.h noit_check.h \ 
     27  /opt/circonus/include/eventer/eventer.h \ 
     28  /opt/circonus/include/mtev_atomic.h \ 
     29  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     30  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     31  /opt/circonus/include/eventer/eventer_jobq.h \ 
     32  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_skiplist.h \ 
     33  /opt/circonus/include/mtev_hooks.h /opt/circonus/include/mtev_conf.h \ 
     34  /opt/circonus/include/mtev_console.h \ 
     35  /opt/circonus/include/noitedit/histedit.h \ 
     36  /opt/circonus/include/mtev_console_telnet.h \ 
     37  /usr/local/Cellar/pcre/8.33/include/pcre.h noit_metric.h \ 
    3838  noit_filters.h bundle.pb-c.h noit_check_log_helpers.h 
    39  
    40 noit_check_log_helpers.o noit_check_log_helpers.lo: noit_check_log_helpers.c noit_defines.h \ 
    41   noit_config.h noitedit/strlcpy.h noit_metric.h \ 
    42   noit_check_log_helpers.h utils/noit_b64.h utils/noit_str.h \ 
    43   utils/noit_log.h utils/noit_hash.h bundle.pb-c.h 
    44  
    45 noit_check_resolver.o noit_check_resolver.lo: noit_check_resolver.c noit_defines.h noit_config.h \ 
    46   noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    47   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    48   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    49   utils/noit_skiplist.h utils/noit_hooks.h noit_conf.h noit_console.h \ 
    50   noitedit/histedit.h noit_console_telnet.h \ 
     39noit_check_log_helpers.o: noit_check_log_helpers.c \ 
     40  /opt/circonus/include/mtev_defines.h \ 
     41  /opt/circonus/include/mtev_config.h \ 
     42  /opt/circonus/include/noitedit/strlcpy.h \ 
     43  /opt/circonus/include/mtev_b64.h /opt/circonus/include/mtev_str.h \ 
     44  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     45  noit_mtev_bridge.h bundle.pb-c.h noit_metric.h \ 
     46  noit_check_log_helpers.h 
     47noit_check_resolver.o: noit_check_resolver.c noit_config.h \ 
     48  /opt/circonus/include/mtev_config.h \ 
     49  /opt/circonus/include/mtev_defines.h \ 
     50  /opt/circonus/include/noitedit/strlcpy.h \ 
     51  /opt/circonus/include/eventer/eventer.h \ 
     52  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     53  /opt/circonus/include/mtev_atomic.h \ 
     54  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     55  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     56  /opt/circonus/include/eventer/eventer_jobq.h \ 
     57  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_skiplist.h \ 
     58  /opt/circonus/include/mtev_hooks.h /opt/circonus/include/mtev_conf.h \ 
     59  /opt/circonus/include/mtev_console.h \ 
     60  /opt/circonus/include/noitedit/histedit.h \ 
     61  /opt/circonus/include/mtev_console_telnet.h \ 
     62  /usr/local/Cellar/pcre/8.33/include/pcre.h noit_mtev_bridge.h \ 
    5163  udns/udns.h 
    52  
    53 noit_check_rest.o noit_check_rest.lo: noit_check_rest.c noit_defines.h noit_config.h \ 
    54   noitedit/strlcpy.h \ 
    55   noit_listener.h eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    56   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    57   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    58   noit_http.h utils/noit_hooks.h noit_rest.h noit_check.h \ 
    59   utils/noit_skiplist.h noit_conf.h noit_console.h noitedit/histedit.h \ 
    60   noit_console_telnet.h  \ 
    61   noit_metric.h noit_check_tools.h noit_module.h noit_dso.h \ 
    62   noit_check_tools_shared.h noit_conf_private.h noit_filters.h \ 
    63   json-lib/json.h json-lib/bits.h json-lib/debug.h json-lib/linkhash.h \ 
    64   json-lib/arraylist.h json-lib/json_util.h json-lib/json_object.h \ 
    65   json-lib/json_tokener.h 
    66  
    67 noit_check_tools.o noit_check_tools.lo: noit_check_tools.c noit_defines.h noit_config.h \ 
    68   noitedit/strlcpy.h dtrace_probes.h libnoit_dtrace_probes.h \ 
    69   noit_dtrace_probes.h stratcon_dtrace_probes.h noit_check_tools.h \ 
    70   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    71   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    72   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    73   noit_module.h noit_dso.h noit_conf.h noit_console.h \ 
    74   noitedit/histedit.h noit_console_telnet.h utils/noit_skiplist.h \ 
    75   utils/noit_hooks.h \ 
    76   noit_check.h noit_metric.h noit_check_tools_shared.h utils/noit_str.h \ 
    77   json-lib/json.h json-lib/bits.h json-lib/debug.h json-lib/linkhash.h \ 
    78   json-lib/arraylist.h json-lib/json_util.h json-lib/json_object.h \ 
    79   json-lib/json_tokener.h 
    80  
    81 noit_check_tools_shared.o noit_check_tools_shared.lo: noit_check_tools_shared.c noit_defines.h \ 
    82   noit_config.h noitedit/strlcpy.h noit_check_tools.h eventer/eventer.h \ 
    83   utils/noit_log.h utils/noit_hash.h utils/noit_atomic.h \ 
    84   eventer/eventer_POSIX_fd_opset.h eventer/eventer_SSL_fd_opset.h \ 
    85   eventer/eventer_jobq.h utils/noit_sem.h noit_module.h noit_dso.h \ 
    86   noit_conf.h noit_console.h noitedit/histedit.h noit_console_telnet.h \ 
    87   utils/noit_skiplist.h  \ 
    88   utils/noit_hooks.h noit_check.h noit_metric.h \ 
    89   noit_check_tools_shared.h utils/noit_str.h 
    90  
    91 noit_conf.o noit_conf.lo: noit_conf.c noit_defines.h noit_config.h noitedit/strlcpy.h \ 
    92   noit_conf.h utils/noit_hash.h noit_console.h eventer/eventer.h \ 
    93   utils/noit_log.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    94   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    95   noitedit/histedit.h noit_console_telnet.h utils/noit_skiplist.h \ 
    96   noit_check.h \ 
    97   utils/noit_hooks.h noit_metric.h noit_version.h noit_xml.h \ 
    98   utils/noit_b64.h utils/noit_watchdog.h utils/noit_security.h 
    99  
    100 noit_conf_checks.o noit_conf_checks.lo: noit_conf_checks.c noit_defines.h noit_config.h \ 
    101   noitedit/strlcpy.h \ 
    102   noit_conf.h utils/noit_hash.h noit_console.h eventer/eventer.h \ 
    103   utils/noit_log.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    104   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    105   noitedit/histedit.h noit_console_telnet.h utils/noit_skiplist.h \ 
    106   noit_conf_private.h \ 
    107   noit_conf_checks.h noit_check.h utils/noit_hooks.h noit_metric.h \ 
    108   noit_check_tools.h noit_module.h noit_dso.h noit_check_tools_shared.h \ 
    109   noit_filters.h 
    110  
    111 noit_console.o noit_console.lo: noit_console.c noit_defines.h noit_config.h \ 
    112   noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    113   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    114   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    115   noit_listener.h noit_console.h noitedit/histedit.h \ 
    116   noit_console_telnet.h utils/noit_skiplist.h noit_tokenizer.h \ 
    117   noitedit/sys.h noitedit/el.h noitedit/tty.h noitedit/prompt.h \ 
    118   noitedit/key.h noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    119   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    120   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    121   noitedit/sig.h noitedit/help.h 
    122  
    123 noit_console_complete.o noit_console_complete.lo: noit_console_complete.c noit_defines.h \ 
    124   noit_config.h noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    125   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    126   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    127   noit_listener.h noit_console.h noitedit/histedit.h \ 
    128   noit_console_telnet.h utils/noit_skiplist.h noit_tokenizer.h \ 
    129   noitedit/sys.h noitedit/el.h noitedit/tty.h noitedit/prompt.h \ 
    130   noitedit/key.h noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    131   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    132   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    133   noitedit/sig.h noitedit/help.h 
    134  
    135 noit_console_state.o noit_console_state.lo: noit_console_state.c noit_defines.h noit_config.h \ 
    136   noitedit/strlcpy.h noit_version.h eventer/eventer.h utils/noit_log.h \ 
    137   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    138   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    139   noit_listener.h noit_console.h noitedit/histedit.h \ 
    140   noit_console_telnet.h utils/noit_skiplist.h noit_tokenizer.h \ 
    141   noit_module.h noit_dso.h noit_conf.h \ 
    142   utils/noit_hooks.h \ 
    143   noit_check.h noit_metric.h 
    144  
    145 noit_console_telnet.o noit_console_telnet.lo: noit_console_telnet.c noit_defines.h noit_config.h \ 
    146   noitedit/strlcpy.h noit_console.h eventer/eventer.h utils/noit_log.h \ 
    147   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    148   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    149   noitedit/histedit.h noit_console_telnet.h utils/noit_skiplist.h 
    150  
    151 noit_dso.o noit_dso.lo: noit_dso.c noit_defines.h noit_config.h noitedit/strlcpy.h \ 
    152   noit_dso.h noit_conf.h utils/noit_hash.h noit_console.h \ 
    153   eventer/eventer.h utils/noit_log.h utils/noit_atomic.h \ 
    154   eventer/eventer_POSIX_fd_opset.h eventer/eventer_SSL_fd_opset.h \ 
    155   eventer/eventer_jobq.h utils/noit_sem.h noitedit/histedit.h \ 
    156   noit_console_telnet.h utils/noit_skiplist.h \ 
    157   utils/noit_hooks.h 
    158  
    159 noit_events_rest.o noit_events_rest.lo: noit_events_rest.c noit_defines.h noit_config.h \ 
    160   noitedit/strlcpy.h noit_listener.h eventer/eventer.h utils/noit_log.h \ 
    161   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    162   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    163   noit_http.h \ 
    164   utils/noit_hooks.h noit_rest.h noit_conf.h noit_console.h \ 
    165   noitedit/histedit.h noit_console_telnet.h utils/noit_skiplist.h \ 
    166   json-lib/json.h \ 
    167   json-lib/bits.h json-lib/debug.h json-lib/linkhash.h \ 
    168   json-lib/arraylist.h json-lib/json_util.h json-lib/json_object.h \ 
    169   json-lib/json_tokener.h 
    170  
    171 noit_filters.o noit_filters.lo: noit_filters.c noit_defines.h noit_config.h \ 
    172   noitedit/strlcpy.h utils/noit_hash.h utils/noit_atomic.h \ 
    173   utils/noit_watchdog.h noit_conf.h noit_console.h eventer/eventer.h \ 
    174   utils/noit_log.h eventer/eventer_POSIX_fd_opset.h \ 
    175   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    176   noitedit/histedit.h noit_console_telnet.h utils/noit_skiplist.h \ 
    177   noit_check.h \ 
    178   utils/noit_hooks.h noit_metric.h noit_conf_checks.h noit_filters.h \ 
    179   noit_capabilities_listener.h \ 
    180  
    181 noit_filters_rest.o noit_filters_rest.lo: noit_filters_rest.c noit_defines.h noit_config.h \ 
    182   noitedit/strlcpy.h \ 
    183   noit_listener.h eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    184   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    185   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    186   noit_http.h utils/noit_hooks.h noit_rest.h noit_filters.h \ 
    187   noit_console.h noitedit/histedit.h noit_console_telnet.h \ 
    188   utils/noit_skiplist.h noit_conf.h \ 
    189   noit_check.h noit_metric.h \ 
    190   noit_check_tools.h noit_module.h noit_dso.h noit_check_tools_shared.h \ 
    191   noit_conf_private.h 
    192  
    193 noit_http.o noit_http.lo: noit_http.c noit_defines.h noit_config.h noitedit/strlcpy.h \ 
    194   noit_http.h \ 
    195   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    196   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    197   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    198   utils/noit_hooks.h noit_listener.h utils/noit_str.h 
    199  
    200 noit_jlog_listener.o noit_jlog_listener.lo: noit_jlog_listener.c noit_defines.h noit_config.h \ 
    201   noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    202   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    203   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    204   noit_listener.h utils/noit_memory.h noit_jlog_listener.h noit_rest.h \ 
    205   noit_http.h \ 
    206   utils/noit_hooks.h 
    207  
    208 noit_listener.o noit_listener.lo: noit_listener.c noit_defines.h noit_config.h \ 
    209   noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    210   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    211   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    212   utils/noit_watchdog.h noit_listener.h noit_conf.h noit_console.h \ 
    213   noitedit/histedit.h noit_console_telnet.h utils/noit_skiplist.h \ 
    214  
    215 noit_livestream_listener.o noit_livestream_listener.lo: noit_livestream_listener.c noit_defines.h \ 
    216   noit_config.h noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    217   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    218   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    219   noit_listener.h utils/noit_memory.h noit_livestream_listener.h \ 
    220   noit_check.h utils/noit_skiplist.h utils/noit_hooks.h noit_conf.h \ 
    221   noit_console.h noitedit/histedit.h noit_console_telnet.h \ 
    222   noit_metric.h 
    223  
    224 noit_main.o noit_main.lo: noit_main.c noit_defines.h noit_config.h noitedit/strlcpy.h \ 
    225   utils/noit_log.h utils/noit_hash.h noit_main.h noit_conf.h \ 
    226   noit_console.h eventer/eventer.h utils/noit_atomic.h \ 
    227   eventer/eventer_POSIX_fd_opset.h eventer/eventer_SSL_fd_opset.h \ 
    228   eventer/eventer_jobq.h utils/noit_sem.h noitedit/histedit.h \ 
    229   noit_console_telnet.h utils/noit_skiplist.h \ 
    230   utils/noit_watchdog.h \ 
    231   utils/noit_lockfile.h 
    232  
    233 noit_module.o noit_module.lo: noit_module.c noit_defines.h noit_config.h \ 
    234   noitedit/strlcpy.h \ 
    235   noit_module.h noit_dso.h noit_conf.h utils/noit_hash.h noit_console.h \ 
    236   eventer/eventer.h utils/noit_log.h utils/noit_atomic.h \ 
    237   eventer/eventer_POSIX_fd_opset.h eventer/eventer_SSL_fd_opset.h \ 
    238   eventer/eventer_jobq.h utils/noit_sem.h noitedit/histedit.h \ 
    239   noit_console_telnet.h utils/noit_skiplist.h \ 
    240   utils/noit_hooks.h \ 
    241   noit_check.h noit_metric.h module-online.h 
    242  
    243 noit_rest.o noit_rest.lo: noit_rest.c noit_defines.h noit_config.h noitedit/strlcpy.h \ 
    244   noit_listener.h eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    245   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    246   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    247   noit_http.h \ 
    248   utils/noit_hooks.h noit_rest.h noit_conf.h noit_console.h \ 
    249   noitedit/histedit.h noit_console_telnet.h utils/noit_skiplist.h \ 
    250  
    251 noit_reverse_socket.o noit_reverse_socket.lo: noit_reverse_socket.c noit_defines.h noit_config.h \ 
    252   noitedit/strlcpy.h noit_listener.h eventer/eventer.h utils/noit_log.h \ 
    253   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    254   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    255   noit_conf.h noit_console.h noitedit/histedit.h noit_console_telnet.h \ 
    256   utils/noit_skiplist.h  \ 
    257   noit_rest.h noit_http.h \ 
    258   utils/noit_hooks.h noit_reverse_socket.h utils/noit_str.h \ 
    259   utils/noit_watchdog.h libnoit_dtrace_probes.h 
    260  
    261 noit_tokenizer.o noit_tokenizer.lo: noit_tokenizer.c noit_defines.h noit_config.h \ 
    262   noitedit/strlcpy.h 
    263  
    264 noit_xml.o noit_xml.lo: noit_xml.c noit_defines.h noit_config.h noitedit/strlcpy.h \ 
    265   noit_xml.h \ 
    266   utils/noit_log.h utils/noit_hash.h utils/noit_mkdir.h 
    267  
    268 noitd.o noitd.lo: noitd.c noit_defines.h noit_config.h noitedit/strlcpy.h \ 
    269   noit_main.h eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    270   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    271   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    272   utils/noit_memory.h utils/noit_security.h utils/noit_watchdog.h \ 
    273   utils/noit_lockfile.h noit_listener.h noit_console.h \ 
    274   noitedit/histedit.h noit_console_telnet.h utils/noit_skiplist.h \ 
    275   noit_jlog_listener.h noit_rest.h noit_http.h \ 
    276   utils/noit_hooks.h noit_reverse_socket.h noit_check_rest.h \ 
    277   noit_check.h noit_conf.h  \ 
    278   noit_metric.h noit_check_tools.h noit_module.h noit_dso.h \ 
    279   noit_check_tools_shared.h json-lib/json.h json-lib/bits.h \ 
    280   json-lib/debug.h json-lib/linkhash.h json-lib/arraylist.h \ 
    281   json-lib/json_util.h json-lib/json_object.h json-lib/json_tokener.h \ 
    282   noit_events_rest.h noit_livestream_listener.h \ 
    283   noit_capabilities_listener.h noit_conf_checks.h noit_filters.h \ 
    284   man/noitd.usage.h 
    285  
    286 stratcon_datastore.o stratcon_datastore.lo: stratcon_datastore.c noit_defines.h noit_config.h \ 
    287   noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    288   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    289   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    290   utils/noit_b64.h utils/noit_str.h utils/noit_mkdir.h \ 
    291   utils/noit_getip.h stratcon_datastore.h stratcon_realtime_http.h \ 
    292   noit_conf.h noit_console.h noitedit/histedit.h noit_console_telnet.h \ 
    293   utils/noit_skiplist.h  \ 
    294   stratcon_ingest.h stratcon_iep.h stratcon_jlog_streamer.h \ 
    295   noit_reverse_socket.h noit_check.h utils/noit_hooks.h noit_metric.h \ 
    296   noit_rest.h noit_listener.h noit_http.h \ 
    297  
    298 stratcon_iep.o stratcon_iep.lo: stratcon_iep.c noit_defines.h noit_config.h \ 
    299   noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    300   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    301   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    302   utils/noit_b64.h noit_jlog_listener.h stratcon_jlog_streamer.h \ 
    303   noit_conf.h noit_console.h noitedit/histedit.h noit_console_telnet.h \ 
    304   utils/noit_skiplist.h  \ 
    305   noit_reverse_socket.h stratcon_datastore.h stratcon_realtime_http.h \ 
    306   stratcon_iep.h noit_check.h utils/noit_hooks.h noit_metric.h 
    307  
    308 stratcon_ingest.o stratcon_ingest.lo: stratcon_ingest.c noit_defines.h noit_config.h \ 
    309   noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    310   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    311   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    312   utils/noit_b64.h utils/noit_str.h utils/noit_mkdir.h \ 
    313   utils/noit_getip.h stratcon_datastore.h stratcon_realtime_http.h \ 
    314   noit_conf.h noit_console.h noitedit/histedit.h noit_console_telnet.h \ 
    315   utils/noit_skiplist.h  \ 
    316   stratcon_ingest.h stratcon_iep.h stratcon_jlog_streamer.h \ 
    317   noit_reverse_socket.h noit_check.h utils/noit_hooks.h noit_metric.h \ 
    318   noit_rest.h noit_listener.h noit_http.h \ 
    319  
    320 stratcon_jlog_streamer.o stratcon_jlog_streamer.lo: stratcon_jlog_streamer.c noit_defines.h \ 
    321   noit_config.h noitedit/strlcpy.h dtrace_probes.h \ 
    322   libnoit_dtrace_probes.h noit_dtrace_probes.h stratcon_dtrace_probes.h \ 
    323   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    324   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    325   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    326   noit_conf.h noit_console.h noitedit/histedit.h noit_console_telnet.h \ 
    327   utils/noit_skiplist.h  \ 
    328   utils/noit_getip.h noit_jlog_listener.h noit_rest.h noit_listener.h \ 
    329   noit_http.h \ 
    330   utils/noit_hooks.h stratcon_datastore.h stratcon_realtime_http.h \ 
    331   stratcon_jlog_streamer.h noit_reverse_socket.h stratcon_iep.h 
    332  
    333 stratcon_realtime_http.o stratcon_realtime_http.lo: stratcon_realtime_http.c noit_defines.h \ 
    334   noit_config.h noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    335   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    336   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    337   noit_conf.h noit_console.h noitedit/histedit.h noit_console_telnet.h \ 
    338   utils/noit_skiplist.h  \ 
    339   utils/noit_str.h noit_jlog_listener.h noit_listener.h noit_http.h \ 
    340   utils/noit_hooks.h noit_rest.h noit_check.h noit_metric.h \ 
     64noit_check_rest.o: noit_check_rest.c /opt/circonus/include/mtev_defines.h \ 
     65  /opt/circonus/include/mtev_config.h \ 
     66  /opt/circonus/include/noitedit/strlcpy.h \ 
     67  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/parser.h \ 
     68  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlversion.h \ 
     69  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlexports.h \ 
     70  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/tree.h \ 
     71  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlstring.h \ 
     72  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlregexp.h \ 
     73  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/dict.h \ 
     74  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/hash.h \ 
     75  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/valid.h \ 
     76  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlerror.h \ 
     77  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/list.h \ 
     78  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlautomata.h \ 
     79  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/entities.h \ 
     80  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/encoding.h \ 
     81  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlIO.h \ 
     82  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/globals.h \ 
     83  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX.h \ 
     84  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xlink.h \ 
     85  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX2.h \ 
     86  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlmemory.h \ 
     87  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/threads.h \ 
     88  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xpath.h \ 
     89  /opt/circonus/include/mtev_listener.h \ 
     90  /opt/circonus/include/eventer/eventer.h \ 
     91  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     92  /opt/circonus/include/mtev_atomic.h \ 
     93  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     94  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     95  /opt/circonus/include/eventer/eventer_jobq.h \ 
     96  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_http.h \ 
     97  /opt/circonus/include/mtev_hooks.h /opt/circonus/include/mtev_rest.h \ 
     98  /opt/circonus/include/mtev_conf.h /opt/circonus/include/mtev_console.h \ 
     99  /opt/circonus/include/noitedit/histedit.h \ 
     100  /opt/circonus/include/mtev_console_telnet.h \ 
     101  /opt/circonus/include/mtev_skiplist.h \ 
     102  /usr/local/Cellar/pcre/8.33/include/pcre.h \ 
     103  /opt/circonus/include/mtev_conf_private.h \ 
     104  /opt/circonus/include/mtev_json.h /opt/circonus/include/mtev_bits.h \ 
     105  /opt/circonus/include/mtev_debug.h \ 
     106  /opt/circonus/include/mtev_linkhash.h \ 
     107  /opt/circonus/include/mtev_arraylist.h \ 
     108  /opt/circonus/include/mtev_json_util.h \ 
     109  /opt/circonus/include/mtev_json_object.h \ 
     110  /opt/circonus/include/mtev_json_tokener.h noit_mtev_bridge.h \ 
     111  noit_filters.h noit_check.h noit_metric.h noit_check_resolver.h \ 
     112  noit_check_tools.h noit_module.h /opt/circonus/include/mtev_dso.h \ 
     113  noit_check_tools_shared.h 
     114noit_check_tools.o: noit_check_tools.c \ 
     115  /opt/circonus/include/mtev_defines.h \ 
     116  /opt/circonus/include/mtev_config.h \ 
     117  /opt/circonus/include/noitedit/strlcpy.h \ 
     118  /opt/circonus/include/mtev_str.h /opt/circonus/include/mtev_json.h \ 
     119  /opt/circonus/include/mtev_bits.h /opt/circonus/include/mtev_debug.h \ 
     120  /opt/circonus/include/mtev_linkhash.h \ 
     121  /opt/circonus/include/mtev_arraylist.h \ 
     122  /opt/circonus/include/mtev_json_util.h \ 
     123  /opt/circonus/include/mtev_json_object.h \ 
     124  /opt/circonus/include/mtev_json_tokener.h noit_mtev_bridge.h \ 
     125  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     126  noit_dtrace_probes.h noit_check_tools.h \ 
     127  /opt/circonus/include/eventer/eventer.h \ 
     128  /opt/circonus/include/mtev_atomic.h \ 
     129  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     130  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     131  /opt/circonus/include/eventer/eventer_jobq.h \ 
     132  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_hooks.h \ 
     133  noit_module.h /opt/circonus/include/mtev_dso.h \ 
     134  /opt/circonus/include/mtev_conf.h /opt/circonus/include/mtev_console.h \ 
     135  /opt/circonus/include/noitedit/histedit.h \ 
     136  /opt/circonus/include/mtev_console_telnet.h \ 
     137  /opt/circonus/include/mtev_skiplist.h \ 
     138  /usr/local/Cellar/pcre/8.33/include/pcre.h noit_check.h noit_metric.h \ 
     139  noit_check_tools_shared.h 
     140noit_check_tools_shared.o: noit_check_tools_shared.c \ 
     141  /opt/circonus/include/mtev_defines.h \ 
     142  /opt/circonus/include/mtev_config.h \ 
     143  /opt/circonus/include/noitedit/strlcpy.h \ 
     144  /opt/circonus/include/mtev_str.h noit_check_tools.h \ 
     145  /opt/circonus/include/eventer/eventer.h \ 
     146  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     147  /opt/circonus/include/mtev_atomic.h \ 
     148  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     149  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     150  /opt/circonus/include/eventer/eventer_jobq.h \ 
     151  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_hooks.h \ 
     152  noit_module.h /opt/circonus/include/mtev_dso.h \ 
     153  /opt/circonus/include/mtev_conf.h /opt/circonus/include/mtev_console.h \ 
     154  /opt/circonus/include/noitedit/histedit.h \ 
     155  /opt/circonus/include/mtev_console_telnet.h \ 
     156  /opt/circonus/include/mtev_skiplist.h \ 
     157  /usr/local/Cellar/pcre/8.33/include/pcre.h noit_check.h noit_metric.h \ 
     158  noit_check_tools_shared.h 
     159noit_conf_checks.o: noit_conf_checks.c \ 
     160  /opt/circonus/include/mtev_defines.h \ 
     161  /opt/circonus/include/mtev_config.h \ 
     162  /opt/circonus/include/noitedit/strlcpy.h \ 
     163  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/parser.h \ 
     164  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlversion.h \ 
     165  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlexports.h \ 
     166  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/tree.h \ 
     167  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlstring.h \ 
     168  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlregexp.h \ 
     169  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/dict.h \ 
     170  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/hash.h \ 
     171  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/valid.h \ 
     172  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlerror.h \ 
     173  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/list.h \ 
     174  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlautomata.h \ 
     175  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/entities.h \ 
     176  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/encoding.h \ 
     177  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlIO.h \ 
     178  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/globals.h \ 
     179  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX.h \ 
     180  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xlink.h \ 
     181  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX2.h \ 
     182  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlmemory.h \ 
     183  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/threads.h \ 
     184  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xpath.h \ 
     185  /opt/circonus/include/mtev_conf.h /opt/circonus/include/mtev_hash.h \ 
     186  /opt/circonus/include/mtev_console.h \ 
     187  /opt/circonus/include/eventer/eventer.h \ 
     188  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_atomic.h \ 
     189  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     190  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     191  /opt/circonus/include/eventer/eventer_jobq.h \ 
     192  /opt/circonus/include/mtev_sem.h \ 
     193  /opt/circonus/include/noitedit/histedit.h \ 
     194  /opt/circonus/include/mtev_console_telnet.h \ 
     195  /opt/circonus/include/mtev_skiplist.h \ 
     196  /usr/local/Cellar/pcre/8.33/include/pcre.h \ 
     197  /opt/circonus/include/mtev_conf_private.h noit_filters.h noit_check.h \ 
     198  /opt/circonus/include/mtev_hooks.h noit_metric.h noit_conf_checks.h \ 
     199  noit_check_tools.h noit_module.h /opt/circonus/include/mtev_dso.h \ 
     200  noit_check_tools_shared.h 
     201noit_filters.o: noit_filters.c /opt/circonus/include/mtev_defines.h \ 
     202  /opt/circonus/include/mtev_config.h \ 
     203  /opt/circonus/include/noitedit/strlcpy.h \ 
     204  /opt/circonus/include/mtev_hash.h /opt/circonus/include/mtev_atomic.h \ 
     205  /opt/circonus/include/mtev_watchdog.h \ 
     206  /opt/circonus/include/mtev_capabilities_listener.h \ 
     207  /opt/circonus/include/eventer/eventer.h \ 
     208  /opt/circonus/include/mtev_log.h \ 
     209  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     210  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     211  /opt/circonus/include/eventer/eventer_jobq.h \ 
     212  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_conf.h \ 
     213  /opt/circonus/include/mtev_console.h \ 
     214  /opt/circonus/include/noitedit/histedit.h \ 
     215  /opt/circonus/include/mtev_console_telnet.h \ 
     216  /opt/circonus/include/mtev_skiplist.h \ 
     217  /usr/local/Cellar/pcre/8.33/include/pcre.h noit_mtev_bridge.h \ 
     218  noit_check.h /opt/circonus/include/mtev_hooks.h noit_metric.h \ 
     219  noit_conf_checks.h noit_filters.h \ 
     220  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/tree.h \ 
     221  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlversion.h \ 
     222  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlexports.h \ 
     223  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlstring.h \ 
     224  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlregexp.h \ 
     225  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/dict.h \ 
     226  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlmemory.h \ 
     227  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/threads.h \ 
     228  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/globals.h \ 
     229  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/parser.h \ 
     230  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/hash.h \ 
     231  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/valid.h \ 
     232  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlerror.h \ 
     233  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/list.h \ 
     234  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlautomata.h \ 
     235  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/entities.h \ 
     236  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/encoding.h \ 
     237  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlIO.h \ 
     238  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX.h \ 
     239  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xlink.h \ 
     240  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX2.h 
     241noit_filters_rest.o: noit_filters_rest.c \ 
     242  /opt/circonus/include/mtev_defines.h \ 
     243  /opt/circonus/include/mtev_config.h \ 
     244  /opt/circonus/include/noitedit/strlcpy.h \ 
     245  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/parser.h \ 
     246  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlversion.h \ 
     247  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlexports.h \ 
     248  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/tree.h \ 
     249  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlstring.h \ 
     250  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlregexp.h \ 
     251  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/dict.h \ 
     252  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/hash.h \ 
     253  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/valid.h \ 
     254  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlerror.h \ 
     255  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/list.h \ 
     256  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlautomata.h \ 
     257  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/entities.h \ 
     258  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/encoding.h \ 
     259  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlIO.h \ 
     260  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/globals.h \ 
     261  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX.h \ 
     262  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xlink.h \ 
     263  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX2.h \ 
     264  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlmemory.h \ 
     265  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/threads.h \ 
     266  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xpath.h \ 
     267  /opt/circonus/include/mtev_listener.h \ 
     268  /opt/circonus/include/eventer/eventer.h \ 
     269  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     270  /opt/circonus/include/mtev_atomic.h \ 
     271  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     272  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     273  /opt/circonus/include/eventer/eventer_jobq.h \ 
     274  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_http.h \ 
     275  /opt/circonus/include/mtev_hooks.h /opt/circonus/include/mtev_rest.h \ 
     276  /opt/circonus/include/mtev_conf.h /opt/circonus/include/mtev_console.h \ 
     277  /opt/circonus/include/noitedit/histedit.h \ 
     278  /opt/circonus/include/mtev_console_telnet.h \ 
     279  /opt/circonus/include/mtev_skiplist.h \ 
     280  /usr/local/Cellar/pcre/8.33/include/pcre.h \ 
     281  /opt/circonus/include/mtev_conf_private.h noit_mtev_bridge.h \ 
     282  noit_filters.h noit_check.h noit_metric.h noit_check_tools.h \ 
     283  noit_module.h /opt/circonus/include/mtev_dso.h \ 
     284  noit_check_tools_shared.h 
     285noit_jlog_listener.o: noit_jlog_listener.c \ 
     286  /opt/circonus/include/mtev_defines.h \ 
     287  /opt/circonus/include/mtev_config.h \ 
     288  /opt/circonus/include/noitedit/strlcpy.h \ 
     289  /opt/circonus/include/eventer/eventer.h \ 
     290  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     291  /opt/circonus/include/mtev_atomic.h \ 
     292  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     293  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     294  /opt/circonus/include/eventer/eventer_jobq.h \ 
     295  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_listener.h \ 
     296  /opt/circonus/include/mtev_memory.h /opt/circonus/include/mtev_rest.h \ 
     297  /opt/circonus/include/mtev_http.h \ 
     298  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/tree.h \ 
     299  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlversion.h \ 
     300  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlexports.h \ 
     301  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlstring.h \ 
     302  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlregexp.h \ 
     303  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/dict.h \ 
     304  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlmemory.h \ 
     305  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/threads.h \ 
     306  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/globals.h \ 
     307  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/parser.h \ 
     308  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/hash.h \ 
     309  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/valid.h \ 
     310  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlerror.h \ 
     311  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/list.h \ 
     312  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlautomata.h \ 
     313  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/entities.h \ 
     314  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/encoding.h \ 
     315  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlIO.h \ 
     316  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX.h \ 
     317  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xlink.h \ 
     318  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX2.h \ 
     319  /opt/circonus/include/mtev_hooks.h noit_mtev_bridge.h \ 
     320  noit_jlog_listener.h 
     321noit_livestream_listener.o: noit_livestream_listener.c \ 
     322  /opt/circonus/include/mtev_defines.h \ 
     323  /opt/circonus/include/mtev_config.h \ 
     324  /opt/circonus/include/noitedit/strlcpy.h \ 
     325  /opt/circonus/include/eventer/eventer.h \ 
     326  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     327  /opt/circonus/include/mtev_atomic.h \ 
     328  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     329  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     330  /opt/circonus/include/eventer/eventer_jobq.h \ 
     331  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_listener.h \ 
     332  /opt/circonus/include/mtev_memory.h noit_mtev_bridge.h \ 
     333  noit_livestream_listener.h noit_check.h \ 
     334  /opt/circonus/include/mtev_skiplist.h \ 
     335  /opt/circonus/include/mtev_hooks.h /opt/circonus/include/mtev_conf.h \ 
     336  /opt/circonus/include/mtev_console.h \ 
     337  /opt/circonus/include/noitedit/histedit.h \ 
     338  /opt/circonus/include/mtev_console_telnet.h \ 
     339  /usr/local/Cellar/pcre/8.33/include/pcre.h noit_metric.h 
     340noit_module.o: noit_module.c /opt/circonus/include/mtev_defines.h \ 
     341  /opt/circonus/include/mtev_config.h \ 
     342  /opt/circonus/include/noitedit/strlcpy.h \ 
     343  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/parser.h \ 
     344  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlversion.h \ 
     345  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlexports.h \ 
     346  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/tree.h \ 
     347  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlstring.h \ 
     348  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlregexp.h \ 
     349  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/dict.h \ 
     350  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/hash.h \ 
     351  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/valid.h \ 
     352  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlerror.h \ 
     353  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/list.h \ 
     354  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlautomata.h \ 
     355  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/entities.h \ 
     356  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/encoding.h \ 
     357  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlIO.h \ 
     358  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/globals.h \ 
     359  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX.h \ 
     360  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xlink.h \ 
     361  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX2.h \ 
     362  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlmemory.h \ 
     363  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/threads.h \ 
     364  /opt/circonus/include/mtev_conf.h /opt/circonus/include/mtev_hash.h \ 
     365  /opt/circonus/include/mtev_console.h \ 
     366  /opt/circonus/include/eventer/eventer.h \ 
     367  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_atomic.h \ 
     368  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     369  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     370  /opt/circonus/include/eventer/eventer_jobq.h \ 
     371  /opt/circonus/include/mtev_sem.h \ 
     372  /opt/circonus/include/noitedit/histedit.h \ 
     373  /opt/circonus/include/mtev_console_telnet.h \ 
     374  /opt/circonus/include/mtev_skiplist.h \ 
     375  /usr/local/Cellar/pcre/8.33/include/pcre.h noit_module.h \ 
     376  /opt/circonus/include/mtev_dso.h /opt/circonus/include/mtev_hooks.h \ 
     377  noit_check.h noit_metric.h noit_mtev_bridge.h module-online.h 
     378noit_mtev_bridge.o: noit_mtev_bridge.c \ 
     379  /opt/circonus/include/eventer/eventer.h \ 
     380  /opt/circonus/include/mtev_defines.h \ 
     381  /opt/circonus/include/mtev_config.h \ 
     382  /opt/circonus/include/noitedit/strlcpy.h \ 
     383  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     384  /opt/circonus/include/mtev_atomic.h \ 
     385  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     386  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     387  /opt/circonus/include/eventer/eventer_jobq.h \ 
     388  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_console.h \ 
     389  /opt/circonus/include/noitedit/histedit.h \ 
     390  /opt/circonus/include/mtev_console_telnet.h \ 
     391  /opt/circonus/include/mtev_skiplist.h 
     392noitd.o: noitd.c noit_config.h /opt/circonus/include/mtev_config.h \ 
     393  /opt/circonus/include/mtev_defines.h \ 
     394  /opt/circonus/include/noitedit/strlcpy.h \ 
     395  /opt/circonus/include/mtev_main.h \ 
     396  /opt/circonus/include/eventer/eventer.h \ 
     397  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     398  /opt/circonus/include/mtev_atomic.h \ 
     399  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     400  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     401  /opt/circonus/include/eventer/eventer_jobq.h \ 
     402  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_memory.h \ 
     403  /opt/circonus/include/mtev_security.h \ 
     404  /opt/circonus/include/mtev_watchdog.h \ 
     405  /opt/circonus/include/mtev_lockfile.h \ 
     406  /opt/circonus/include/mtev_listener.h \ 
     407  /opt/circonus/include/mtev_console.h \ 
     408  /opt/circonus/include/noitedit/histedit.h \ 
     409  /opt/circonus/include/mtev_console_telnet.h \ 
     410  /opt/circonus/include/mtev_skiplist.h \ 
     411  /opt/circonus/include/mtev_rest.h /opt/circonus/include/mtev_http.h \ 
     412  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/tree.h \ 
     413  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlversion.h \ 
     414  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlexports.h \ 
     415  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlstring.h \ 
     416  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlregexp.h \ 
     417  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/dict.h \ 
     418  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlmemory.h \ 
     419  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/threads.h \ 
     420  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/globals.h \ 
     421  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/parser.h \ 
     422  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/hash.h \ 
     423  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/valid.h \ 
     424  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlerror.h \ 
     425  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/list.h \ 
     426  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlautomata.h \ 
     427  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/entities.h \ 
     428  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/encoding.h \ 
     429  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlIO.h \ 
     430  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX.h \ 
     431  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xlink.h \ 
     432  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX2.h \ 
     433  /opt/circonus/include/mtev_hooks.h \ 
     434  /opt/circonus/include/mtev_reverse_socket.h \ 
     435  /opt/circonus/include/mtev_capabilities_listener.h \ 
     436  /opt/circonus/include/mtev_conf.h \ 
     437  /usr/local/Cellar/pcre/8.33/include/pcre.h \ 
     438  /opt/circonus/include/mtev_events_rest.h noit_mtev_bridge.h \ 
     439  noit_jlog_listener.h noit_check_rest.h noit_check.h noit_metric.h \ 
     440  noit_check_tools.h noit_module.h /opt/circonus/include/mtev_dso.h \ 
     441  noit_check_tools_shared.h /opt/circonus/include/mtev_json.h \ 
     442  /opt/circonus/include/mtev_bits.h /opt/circonus/include/mtev_debug.h \ 
     443  /opt/circonus/include/mtev_linkhash.h \ 
     444  /opt/circonus/include/mtev_arraylist.h \ 
     445  /opt/circonus/include/mtev_json_util.h \ 
     446  /opt/circonus/include/mtev_json_object.h \ 
     447  /opt/circonus/include/mtev_json_tokener.h noit_livestream_listener.h \ 
     448  noit_conf_checks.h noit_filters.h man/noitd.usage.h 
     449stratcon_datastore.o: stratcon_datastore.c \ 
     450  /opt/circonus/include/mtev_defines.h \ 
     451  /opt/circonus/include/mtev_config.h \ 
     452  /opt/circonus/include/noitedit/strlcpy.h \ 
     453  /opt/circonus/include/eventer/eventer.h \ 
     454  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     455  /opt/circonus/include/mtev_atomic.h \ 
     456  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     457  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     458  /opt/circonus/include/eventer/eventer_jobq.h \ 
     459  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_conf.h \ 
     460  /opt/circonus/include/mtev_console.h \ 
     461  /opt/circonus/include/noitedit/histedit.h \ 
     462  /opt/circonus/include/mtev_console_telnet.h \ 
     463  /opt/circonus/include/mtev_skiplist.h \ 
     464  /usr/local/Cellar/pcre/8.33/include/pcre.h \ 
     465  /opt/circonus/include/mtev_rest.h \ 
     466  /opt/circonus/include/mtev_listener.h \ 
     467  /opt/circonus/include/mtev_http.h \ 
     468  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/tree.h \ 
     469  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlversion.h \ 
     470  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlexports.h \ 
     471  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlstring.h \ 
     472  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlregexp.h \ 
     473  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/dict.h \ 
     474  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlmemory.h \ 
     475  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/threads.h \ 
     476  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/globals.h \ 
     477  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/parser.h \ 
     478  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/hash.h \ 
     479  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/valid.h \ 
     480  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlerror.h \ 
     481  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/list.h \ 
     482  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlautomata.h \ 
     483  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/entities.h \ 
     484  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/encoding.h \ 
     485  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlIO.h \ 
     486  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX.h \ 
     487  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xlink.h \ 
     488  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX2.h \ 
     489  /opt/circonus/include/mtev_hooks.h /opt/circonus/include/mtev_b64.h \ 
     490  /opt/circonus/include/mtev_str.h /opt/circonus/include/mtev_mkdir.h \ 
     491  /opt/circonus/include/mtev_getip.h noit_mtev_bridge.h \ 
     492  stratcon_datastore.h stratcon_realtime_http.h stratcon_ingest.h \ 
     493  stratcon_iep.h stratcon_jlog_streamer.h \ 
     494  /opt/circonus/include/mtev_reverse_socket.h noit_check.h noit_metric.h 
     495stratcon_iep.o: stratcon_iep.c /opt/circonus/include/mtev_defines.h \ 
     496  /opt/circonus/include/mtev_config.h \ 
     497  /opt/circonus/include/noitedit/strlcpy.h \ 
     498  /opt/circonus/include/eventer/eventer.h \ 
     499  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     500  /opt/circonus/include/mtev_atomic.h \ 
     501  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     502  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     503  /opt/circonus/include/eventer/eventer_jobq.h \ 
     504  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_b64.h \ 
     505  /opt/circonus/include/mtev_conf.h /opt/circonus/include/mtev_console.h \ 
     506  /opt/circonus/include/noitedit/histedit.h \ 
     507  /opt/circonus/include/mtev_console_telnet.h \ 
     508  /opt/circonus/include/mtev_skiplist.h \ 
     509  /usr/local/Cellar/pcre/8.33/include/pcre.h noit_mtev_bridge.h \ 
     510  noit_jlog_listener.h stratcon_jlog_streamer.h \ 
     511  /opt/circonus/include/mtev_reverse_socket.h stratcon_datastore.h \ 
     512  stratcon_realtime_http.h stratcon_iep.h noit_check.h \ 
     513  /opt/circonus/include/mtev_hooks.h noit_metric.h 
     514stratcon_ingest.o: stratcon_ingest.c /opt/circonus/include/mtev_defines.h \ 
     515  /opt/circonus/include/mtev_config.h \ 
     516  /opt/circonus/include/noitedit/strlcpy.h \ 
     517  /opt/circonus/include/eventer/eventer.h \ 
     518  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     519  /opt/circonus/include/mtev_atomic.h \ 
     520  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     521  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     522  /opt/circonus/include/eventer/eventer_jobq.h \ 
     523  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_b64.h \ 
     524  /opt/circonus/include/mtev_str.h /opt/circonus/include/mtev_mkdir.h \ 
     525  /opt/circonus/include/mtev_getip.h /opt/circonus/include/mtev_conf.h \ 
     526  /opt/circonus/include/mtev_console.h \ 
     527  /opt/circonus/include/noitedit/histedit.h \ 
     528  /opt/circonus/include/mtev_console_telnet.h \ 
     529  /opt/circonus/include/mtev_skiplist.h \ 
     530  /usr/local/Cellar/pcre/8.33/include/pcre.h \ 
     531  /opt/circonus/include/mtev_rest.h \ 
     532  /opt/circonus/include/mtev_listener.h \ 
     533  /opt/circonus/include/mtev_http.h \ 
     534  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/tree.h \ 
     535  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlversion.h \ 
     536  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlexports.h \ 
     537  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlstring.h \ 
     538  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlregexp.h \ 
     539  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/dict.h \ 
     540  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlmemory.h \ 
     541  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/threads.h \ 
     542  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/globals.h \ 
     543  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/parser.h \ 
     544  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/hash.h \ 
     545  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/valid.h \ 
     546  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlerror.h \ 
     547  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/list.h \ 
     548  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlautomata.h \ 
     549  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/entities.h \ 
     550  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/encoding.h \ 
     551  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlIO.h \ 
     552  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX.h \ 
     553  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xlink.h \ 
     554  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX2.h \ 
     555  /opt/circonus/include/mtev_hooks.h noit_mtev_bridge.h \ 
     556  stratcon_datastore.h stratcon_realtime_http.h stratcon_ingest.h \ 
     557  stratcon_iep.h stratcon_jlog_streamer.h \ 
     558  /opt/circonus/include/mtev_reverse_socket.h noit_check.h noit_metric.h 
     559stratcon_jlog_streamer.o: stratcon_jlog_streamer.c \ 
     560  /opt/circonus/include/mtev_defines.h \ 
     561  /opt/circonus/include/mtev_config.h \ 
     562  /opt/circonus/include/noitedit/strlcpy.h \ 
     563  /opt/circonus/include/eventer/eventer.h \ 
     564  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     565  /opt/circonus/include/mtev_atomic.h \ 
     566  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     567  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     568  /opt/circonus/include/eventer/eventer_jobq.h \ 
     569  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_conf.h \ 
     570  /opt/circonus/include/mtev_console.h \ 
     571  /opt/circonus/include/noitedit/histedit.h \ 
     572  /opt/circonus/include/mtev_console_telnet.h \ 
     573  /opt/circonus/include/mtev_skiplist.h \ 
     574  /usr/local/Cellar/pcre/8.33/include/pcre.h \ 
     575  /opt/circonus/include/mtev_getip.h /opt/circonus/include/mtev_rest.h \ 
     576  /opt/circonus/include/mtev_listener.h \ 
     577  /opt/circonus/include/mtev_http.h \ 
     578  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/tree.h \ 
     579  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlversion.h \ 
     580  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlexports.h \ 
     581  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlstring.h \ 
     582  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlregexp.h \ 
     583  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/dict.h \ 
     584  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlmemory.h \ 
     585  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/threads.h \ 
     586  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/globals.h \ 
     587  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/parser.h \ 
     588  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/hash.h \ 
     589  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/valid.h \ 
     590  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlerror.h \ 
     591  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/list.h \ 
     592  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlautomata.h \ 
     593  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/entities.h \ 
     594  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/encoding.h \ 
     595  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlIO.h \ 
     596  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX.h \ 
     597  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xlink.h \ 
     598  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX2.h \ 
     599  /opt/circonus/include/mtev_hooks.h noit_mtev_bridge.h \ 
     600  stratcon_dtrace_probes.h noit_jlog_listener.h stratcon_datastore.h \ 
     601  stratcon_realtime_http.h stratcon_jlog_streamer.h \ 
     602  /opt/circonus/include/mtev_reverse_socket.h stratcon_iep.h 
     603stratcon_realtime_http.o: stratcon_realtime_http.c \ 
     604  /opt/circonus/include/mtev_defines.h \ 
     605  /opt/circonus/include/mtev_config.h \ 
     606  /opt/circonus/include/noitedit/strlcpy.h \ 
     607  /opt/circonus/include/eventer/eventer.h \ 
     608  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     609  /opt/circonus/include/mtev_atomic.h \ 
     610  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     611  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     612  /opt/circonus/include/eventer/eventer_jobq.h \ 
     613  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_conf.h \ 
     614  /opt/circonus/include/mtev_console.h \ 
     615  /opt/circonus/include/noitedit/histedit.h \ 
     616  /opt/circonus/include/mtev_console_telnet.h \ 
     617  /opt/circonus/include/mtev_skiplist.h \ 
     618  /usr/local/Cellar/pcre/8.33/include/pcre.h \ 
     619  /opt/circonus/include/mtev_listener.h \ 
     620  /opt/circonus/include/mtev_http.h \ 
     621  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/tree.h \ 
     622  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlversion.h \ 
     623  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlexports.h \ 
     624  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlstring.h \ 
     625  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlregexp.h \ 
     626  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/dict.h \ 
     627  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlmemory.h \ 
     628  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/threads.h \ 
     629  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/globals.h \ 
     630  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/parser.h \ 
     631  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/hash.h \ 
     632  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/valid.h \ 
     633  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlerror.h \ 
     634  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/list.h \ 
     635  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlautomata.h \ 
     636  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/entities.h \ 
     637  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/encoding.h \ 
     638  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlIO.h \ 
     639  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX.h \ 
     640  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xlink.h \ 
     641  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX2.h \ 
     642  /opt/circonus/include/mtev_hooks.h /opt/circonus/include/mtev_rest.h \ 
     643  /opt/circonus/include/mtev_str.h noit_mtev_bridge.h \ 
     644  noit_jlog_listener.h noit_check.h noit_metric.h \ 
    341645  noit_check_log_helpers.h noit_livestream_listener.h \ 
    342646  stratcon_realtime_http.h stratcon_jlog_streamer.h \ 
    343   noit_reverse_socket.h stratcon_datastore.h 
    344  
    345 stratcond.o stratcond.lo: stratcond.c noit_defines.h noit_config.h noitedit/strlcpy.h \ 
    346   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    347   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    348   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    349   utils/noit_memory.h utils/noit_security.h utils/noit_watchdog.h \ 
    350   utils/noit_lockfile.h noit_main.h noit_listener.h noit_console.h \ 
    351   noitedit/histedit.h noit_console_telnet.h utils/noit_skiplist.h \ 
    352   noit_module.h noit_dso.h noit_conf.h \ 
    353   utils/noit_hooks.h \ 
    354   noit_check.h noit_metric.h noit_rest.h noit_http.h \ 
    355   noit_reverse_socket.h noit_events_rest.h noit_capabilities_listener.h \ 
    356   stratcon_jlog_streamer.h stratcon_datastore.h stratcon_realtime_http.h \ 
    357   stratcon_iep.h man/stratcond.usage.h 
    358  
    359 t.o t.lo: t.c 
    360  
    361 utils/noit_b32.o utils/noit_b32.lo: utils/noit_b32.c noit_config.h utils/noit_b64.h \ 
    362   noit_defines.h noitedit/strlcpy.h 
    363  
    364 utils/noit_b64.o utils/noit_b64.lo: utils/noit_b64.c noit_config.h utils/noit_b64.h \ 
    365   noit_defines.h noitedit/strlcpy.h 
    366  
    367 utils/noit_btrie.o utils/noit_btrie.lo: utils/noit_btrie.c noit_defines.h noit_config.h \ 
    368   noitedit/strlcpy.h utils/noit_btrie.h 
    369  
    370 utils/noit_getip.o utils/noit_getip.lo: utils/noit_getip.c noit_config.h utils/noit_getip.h \ 
    371   noit_defines.h noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    372   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    373   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h 
    374  
    375 utils/noit_hash.o utils/noit_hash.lo: utils/noit_hash.c noit_config.h utils/noit_hash.h 
    376  
    377 utils/noit_lockfile.o utils/noit_lockfile.lo: utils/noit_lockfile.c noit_config.h \ 
    378   utils/noit_lockfile.h noit_defines.h noitedit/strlcpy.h 
    379  
    380 utils/noit_log.o utils/noit_log.lo: utils/noit_log.c noit_defines.h noit_config.h \ 
    381   noitedit/strlcpy.h utils/noit_log.h utils/noit_hash.h \ 
    382   utils/noit_atomic.h libnoit_dtrace_probes.h 
    383  
    384 utils/noit_memory.o utils/noit_memory.lo: utils/noit_memory.c utils/noit_log.h noit_defines.h \ 
    385   noit_config.h noitedit/strlcpy.h utils/noit_hash.h 
    386  
    387 utils/noit_mkdir.o utils/noit_mkdir.lo: utils/noit_mkdir.c noit_config.h utils/noit_mkdir.h \ 
    388   noit_defines.h noitedit/strlcpy.h utils/noit_log.h utils/noit_hash.h 
    389  
    390 utils/noit_security.o utils/noit_security.lo: utils/noit_security.c noit_defines.h noit_config.h \ 
    391   noitedit/strlcpy.h utils/noit_log.h utils/noit_hash.h \ 
    392   utils/noit_security.h 
    393  
    394 utils/noit_sem.o utils/noit_sem.lo: utils/noit_sem.c noit_defines.h noit_config.h \ 
    395   noitedit/strlcpy.h utils/noit_sem.h 
    396  
    397 utils/noit_skiplist.o utils/noit_skiplist.lo: utils/noit_skiplist.c noit_defines.h noit_config.h \ 
    398   noitedit/strlcpy.h utils/noit_skiplist.h 
    399  
    400 utils/noit_str.o utils/noit_str.lo: utils/noit_str.c noit_defines.h noit_config.h \ 
    401   noitedit/strlcpy.h 
    402  
    403 utils/noit_watchdog.o utils/noit_watchdog.lo: utils/noit_watchdog.c noit_defines.h noit_config.h \ 
    404   noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    405   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    406   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    407   utils/noit_watchdog.h 
    408  
    409 udns/dnsget.o udns/dnsget.lo: udns/dnsget.c udns/udns.h udns/getopt.c 
    410  
    411 udns/ex-rdns.o udns/ex-rdns.lo: udns/ex-rdns.c udns/udns.h 
    412  
    413 udns/getopt.o udns/getopt.lo: udns/getopt.c 
    414  
    415 udns/inet_XtoX.o udns/inet_XtoX.lo: udns/inet_XtoX.c 
    416  
    417 udns/rblcheck.o udns/rblcheck.lo: udns/rblcheck.c udns/udns.h udns/getopt.c 
    418  
    419 udns/udns_XtoX.o udns/udns_XtoX.lo: udns/udns_XtoX.c udns/udns.h udns/inet_XtoX.c 
    420  
    421 udns/udns_bl.o udns/udns_bl.lo: udns/udns_bl.c udns/udns.h 
    422  
    423 udns/udns_codes.o udns/udns_codes.lo: udns/udns_codes.c udns/udns.h 
    424  
    425 udns/udns_dn.o udns/udns_dn.lo: udns/udns_dn.c udns/udns.h 
    426  
    427 udns/udns_dntosp.o udns/udns_dntosp.lo: udns/udns_dntosp.c udns/udns.h 
    428  
    429 udns/udns_init.o udns/udns_init.lo: udns/udns_init.c udns/udns.h 
    430  
    431 udns/udns_jran.o udns/udns_jran.lo: udns/udns_jran.c udns/udns.h 
    432  
    433 udns/udns_misc.o udns/udns_misc.lo: udns/udns_misc.c udns/udns.h 
    434  
    435 udns/udns_parse.o udns/udns_parse.lo: udns/udns_parse.c udns/udns.h 
    436  
    437 udns/udns_resolver.o udns/udns_resolver.lo: udns/udns_resolver.c udns/udns.h 
    438  
    439 udns/udns_rr_a.o udns/udns_rr_a.lo: udns/udns_rr_a.c udns/udns.h 
    440  
    441 udns/udns_rr_mx.o udns/udns_rr_mx.lo: udns/udns_rr_mx.c udns/udns.h 
    442  
    443 udns/udns_rr_naptr.o udns/udns_rr_naptr.lo: udns/udns_rr_naptr.c udns/udns.h 
    444  
    445 udns/udns_rr_ptr.o udns/udns_rr_ptr.lo: udns/udns_rr_ptr.c udns/udns.h 
    446  
    447 udns/udns_rr_srv.o udns/udns_rr_srv.lo: udns/udns_rr_srv.c udns/udns.h 
    448  
    449 udns/udns_rr_txt.o udns/udns_rr_txt.lo: udns/udns_rr_txt.c udns/udns.h 
    450  
    451 eventer/OETS_asn1_helper.o eventer/OETS_asn1_helper.lo: eventer/OETS_asn1_helper.c 
    452  
    453 eventer/eventer.o eventer/eventer.lo: eventer/eventer.c eventer/eventer.h noit_defines.h \ 
    454   noit_config.h noitedit/strlcpy.h utils/noit_log.h utils/noit_hash.h \ 
    455   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    456   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h 
    457  
    458 eventer/eventer_POSIX_fd_opset.o eventer/eventer_POSIX_fd_opset.lo: eventer/eventer_POSIX_fd_opset.c noit_defines.h \ 
    459   noit_config.h noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    460   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    461   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    462   libnoit_dtrace_probes.h 
    463  
    464 eventer/eventer_SSL_fd_opset.o eventer/eventer_SSL_fd_opset.lo: eventer/eventer_SSL_fd_opset.c noit_defines.h \ 
    465   noit_config.h noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    466   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    467   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    468   eventer/OETS_asn1_helper.h libnoit_dtrace_probes.h 
    469  
    470 eventer/eventer_impl.o eventer/eventer_impl.lo: eventer/eventer_impl.c noit_defines.h noit_config.h \ 
    471   noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    472   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    473   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    474   utils/noit_memory.h utils/noit_skiplist.h utils/noit_watchdog.h \ 
    475   libnoit_dtrace_probes.h 
    476  
    477 eventer/eventer_jobq.o eventer/eventer_jobq.lo: eventer/eventer_jobq.c noit_defines.h noit_config.h \ 
    478   noitedit/strlcpy.h utils/noit_memory.h utils/noit_log.h \ 
    479   utils/noit_hash.h utils/noit_atomic.h eventer/eventer.h \ 
    480   eventer/eventer_POSIX_fd_opset.h eventer/eventer_SSL_fd_opset.h \ 
    481   eventer/eventer_jobq.h utils/noit_sem.h libnoit_dtrace_probes.h 
    482  
    483 eventer/eventer_kqueue_impl.o eventer/eventer_kqueue_impl.lo: eventer/eventer_kqueue_impl.c noit_defines.h \ 
    484   noit_config.h noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    485   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    486   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    487   utils/noit_skiplist.h utils/noit_memory.h libnoit_dtrace_probes.h \ 
    488   eventer/eventer_impl_private.h 
    489  
    490 noitedit/chared.o noitedit/chared.lo: noitedit/chared.c noitedit/compat.h noit_defines.h \ 
    491   noit_config.h noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h \ 
    492   noitedit/el.h eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    493   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    494   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    495   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    496   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    497   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    498   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    499   noitedit/sig.h noitedit/help.h 
    500  
    501 noitedit/common.o noitedit/common.lo: noitedit/common.c noitedit/compat.h noit_defines.h \ 
    502   noit_config.h noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h \ 
    503   noitedit/el.h eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    504   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    505   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    506   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    507   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    508   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    509   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    510   noitedit/sig.h noitedit/help.h 
    511  
    512 noitedit/el.o noitedit/el.lo: noitedit/el.c noitedit/compat.h noit_defines.h noit_config.h \ 
    513   noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h noitedit/el.h \ 
    514   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    515   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    516   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    517   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    518   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    519   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    520   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    521   noitedit/sig.h noitedit/help.h 
    522  
    523 noitedit/emacs.o noitedit/emacs.lo: noitedit/emacs.c noitedit/compat.h noit_defines.h noit_config.h \ 
    524   noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h noitedit/el.h \ 
    525   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    526   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    527   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    528   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    529   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    530   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    531   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    532   noitedit/sig.h noitedit/help.h 
    533  
    534 noitedit/fcns.o noitedit/fcns.lo: noitedit/fcns.c noitedit/sys.h noit_config.h noitedit/el.h \ 
    535   noit_defines.h noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    536   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    537   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    538   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    539   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    540   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    541   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    542   noitedit/sig.h noitedit/help.h 
    543  
    544 noitedit/fgetln.o noitedit/fgetln.lo: noitedit/fgetln.c noit_defines.h noit_config.h \ 
    545   noitedit/strlcpy.h noitedit/compat.h noitedit/fgetln.h 
    546  
    547 noitedit/help.o noitedit/help.lo: noitedit/help.c noitedit/sys.h noit_config.h noitedit/el.h \ 
    548   noit_defines.h noitedit/strlcpy.h eventer/eventer.h utils/noit_log.h \ 
    549   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    550   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    551   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    552   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    553   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    554   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    555   noitedit/sig.h noitedit/help.h 
    556  
    557 noitedit/hist.o noitedit/hist.lo: noitedit/hist.c noitedit/compat.h noit_defines.h noit_config.h \ 
    558   noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h noitedit/el.h \ 
    559   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    560   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    561   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    562   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    563   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    564   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    565   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    566   noitedit/sig.h noitedit/help.h 
    567  
    568 noitedit/history.o noitedit/history.lo: noitedit/history.c noitedit/compat.h noit_defines.h \ 
    569   noit_config.h noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h \ 
    570   noitedit/histedit.h eventer/eventer.h utils/noit_log.h \ 
    571   utils/noit_hash.h utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    572   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h 
    573  
    574 noitedit/key.o noitedit/key.lo: noitedit/key.c noitedit/compat.h noit_defines.h noit_config.h \ 
    575   noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h noitedit/el.h \ 
    576   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    577   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    578   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    579   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    580   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    581   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    582   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    583   noitedit/sig.h noitedit/help.h 
    584  
    585 noitedit/map.o noitedit/map.lo: noitedit/map.c noitedit/compat.h noit_defines.h noit_config.h \ 
    586   noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h noitedit/el.h \ 
    587   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    588   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    589   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    590   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    591   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    592   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    593   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    594   noitedit/sig.h noitedit/help.h 
    595  
    596 noitedit/parse.o noitedit/parse.lo: noitedit/parse.c noitedit/compat.h noit_defines.h noit_config.h \ 
    597   noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h noitedit/el.h \ 
    598   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    599   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    600   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    601   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    602   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    603   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    604   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    605   noitedit/sig.h noitedit/help.h noitedit/tokenizer.h 
    606  
    607 noitedit/prompt.o noitedit/prompt.lo: noitedit/prompt.c noitedit/compat.h noit_defines.h \ 
    608   noit_config.h noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h \ 
    609   noitedit/el.h eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    610   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    611   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    612   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    613   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    614   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    615   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    616   noitedit/sig.h noitedit/help.h 
    617  
    618 noitedit/read.o noitedit/read.lo: noitedit/read.c noitedit/compat.h noit_defines.h noit_config.h \ 
    619   noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h noitedit/el.h \ 
    620   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    621   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    622   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    623   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    624   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    625   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    626   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    627   noitedit/sig.h noitedit/help.h 
    628  
    629 noitedit/readline.o noitedit/readline.lo: noitedit/readline.c noitedit/compat.h noit_defines.h \ 
    630   noit_config.h noitedit/strlcpy.h noitedit/fgetln.h noitedit/histedit.h \ 
    631   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    632   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    633   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    634   noitedit/readline/readline.h noitedit/sys.h noitedit/el.h \ 
    635   noitedit/tty.h noitedit/prompt.h noitedit/key.h noitedit/el_term.h \ 
    636   noitedit/refresh.h noitedit/chared.h noitedit/common.h noitedit/vi.h \ 
    637   noitedit/emacs.h noitedit/search.h noitedit/fcns.h noitedit/hist.h \ 
    638   noitedit/map.h noitedit/parse.h noitedit/sig.h noitedit/help.h 
    639  
    640 noitedit/refresh.o noitedit/refresh.lo: noitedit/refresh.c noitedit/compat.h noit_defines.h \ 
    641   noit_config.h noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h \ 
    642   noitedit/el.h eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    643   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    644   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    645   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    646   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    647   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    648   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    649   noitedit/sig.h noitedit/help.h 
    650  
    651 noitedit/search.o noitedit/search.lo: noitedit/search.c noitedit/compat.h noit_defines.h \ 
    652   noit_config.h noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h \ 
    653   noitedit/el.h eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    654   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    655   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    656   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    657   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    658   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    659   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    660   noitedit/sig.h noitedit/help.h 
    661  
    662 noitedit/sig.o noitedit/sig.lo: noitedit/sig.c noitedit/compat.h noit_defines.h noit_config.h \ 
    663   noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h noitedit/el.h \ 
    664   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    665   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    666   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    667   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    668   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    669   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    670   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    671   noitedit/sig.h noitedit/help.h 
    672  
    673 noitedit/strlcpy.o noitedit/strlcpy.lo: noitedit/strlcpy.c noit_defines.h noit_config.h \ 
    674   noitedit/strlcpy.h 
    675  
    676 noitedit/term.o noitedit/term.lo: noitedit/term.c noitedit/compat.h noit_defines.h noit_config.h \ 
    677   noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h noitedit/el.h \ 
    678   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    679   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    680   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    681   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    682   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    683   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    684   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    685   noitedit/sig.h noitedit/help.h 
    686  
    687 noitedit/tokenizer.o noitedit/tokenizer.lo: noitedit/tokenizer.c noitedit/compat.h noit_defines.h \ 
    688   noit_config.h noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h \ 
    689   noitedit/tokenizer.h 
    690  
    691 noitedit/tty.o noitedit/tty.lo: noitedit/tty.c noitedit/compat.h noit_defines.h noit_config.h \ 
    692   noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h noitedit/el.h \ 
    693   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    694   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    695   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    696   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    697   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    698   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    699   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    700   noitedit/sig.h noitedit/help.h 
    701  
    702 noitedit/vi.o noitedit/vi.lo: noitedit/vi.c noitedit/compat.h noit_defines.h noit_config.h \ 
    703   noitedit/strlcpy.h noitedit/fgetln.h noitedit/sys.h noitedit/el.h \ 
    704   eventer/eventer.h utils/noit_log.h utils/noit_hash.h \ 
    705   utils/noit_atomic.h eventer/eventer_POSIX_fd_opset.h \ 
    706   eventer/eventer_SSL_fd_opset.h eventer/eventer_jobq.h utils/noit_sem.h \ 
    707   noitedit/tty.h noitedit/histedit.h noitedit/prompt.h noitedit/key.h \ 
    708   noitedit/el_term.h noitedit/refresh.h noitedit/chared.h \ 
    709   noitedit/common.h noitedit/vi.h noitedit/emacs.h noitedit/search.h \ 
    710   noitedit/fcns.h noitedit/hist.h noitedit/map.h noitedit/parse.h \ 
    711   noitedit/sig.h noitedit/help.h 
    712  
    713 json-lib/arraylist.o json-lib/arraylist.lo: json-lib/arraylist.c noit_config.h json-lib/bits.h \ 
    714   json-lib/arraylist.h 
    715  
    716 json-lib/debug.o json-lib/debug.lo: json-lib/debug.c noit_config.h json-lib/debug.h 
    717  
    718 json-lib/json_object.o json-lib/json_object.lo: json-lib/json_object.c noit_config.h json-lib/debug.h \ 
    719   json-lib/printbuf.h json-lib/linkhash.h json-lib/arraylist.h \ 
    720   json-lib/json_object.h json-lib/json_object_private.h 
    721  
    722 json-lib/json_tokener.o json-lib/json_tokener.lo: json-lib/json_tokener.c noit_config.h json-lib/bits.h \ 
    723   json-lib/debug.h json-lib/printbuf.h json-lib/arraylist.h \ 
    724   json-lib/json_object.h json-lib/json_tokener.h 
    725  
    726 json-lib/json_util.o json-lib/json_util.lo: json-lib/json_util.c noit_config.h json-lib/bits.h \ 
    727   json-lib/debug.h json-lib/printbuf.h json-lib/json_object.h \ 
    728   json-lib/json_tokener.h json-lib/json_util.h 
    729  
    730 json-lib/linkhash.o json-lib/linkhash.lo: json-lib/linkhash.c json-lib/linkhash.h 
    731  
    732 json-lib/printbuf.o json-lib/printbuf.lo: json-lib/printbuf.c noit_config.h json-lib/bits.h \ 
    733   json-lib/debug.h json-lib/printbuf.h 
    734  
    735 yajl-lib/yajl.o yajl-lib/yajl.lo: yajl-lib/yajl.c yajl-lib/yajl_parse.h yajl-lib/yajl_common.h \ 
    736   yajl-lib/yajl_lex.h yajl-lib/yajl_parser.h yajl-lib/yajl_bytestack.h \ 
    737   yajl-lib/yajl_buf.h yajl-lib/yajl_alloc.h 
    738  
    739 yajl-lib/yajl_alloc.o yajl-lib/yajl_alloc.lo: yajl-lib/yajl_alloc.c yajl-lib/yajl_alloc.h \ 
    740   yajl-lib/yajl_common.h 
    741  
    742 yajl-lib/yajl_buf.o yajl-lib/yajl_buf.lo: yajl-lib/yajl_buf.c yajl-lib/yajl_buf.h \ 
    743   yajl-lib/yajl_common.h yajl-lib/yajl_alloc.h 
    744  
    745 yajl-lib/yajl_encode.o yajl-lib/yajl_encode.lo: yajl-lib/yajl_encode.c yajl-lib/yajl_encode.h \ 
    746   yajl-lib/yajl_buf.h yajl-lib/yajl_common.h yajl-lib/yajl_alloc.h \ 
    747   yajl-lib/yajl_gen.h 
    748  
    749 yajl-lib/yajl_gen.o yajl-lib/yajl_gen.lo: yajl-lib/yajl_gen.c yajl-lib/yajl_gen.h \ 
    750   yajl-lib/yajl_common.h yajl-lib/yajl_buf.h yajl-lib/yajl_alloc.h \ 
    751   yajl-lib/yajl_encode.h 
    752  
    753 yajl-lib/yajl_lex.o yajl-lib/yajl_lex.lo: yajl-lib/yajl_lex.c yajl-lib/yajl_lex.h \ 
    754   yajl-lib/yajl_common.h yajl-lib/yajl_buf.h yajl-lib/yajl_alloc.h 
    755  
    756 yajl-lib/yajl_parser.o yajl-lib/yajl_parser.lo: yajl-lib/yajl_parser.c yajl-lib/yajl_parse.h \ 
    757   yajl-lib/yajl_common.h yajl-lib/yajl_lex.h yajl-lib/yajl_parser.h \ 
    758   yajl-lib/yajl_bytestack.h yajl-lib/yajl_buf.h yajl-lib/yajl_alloc.h \ 
    759   yajl-lib/yajl_encode.h yajl-lib/yajl_gen.h 
    760  
    761 yajl-lib/yajl_tree.o yajl-lib/yajl_tree.lo: yajl-lib/yajl_tree.c yajl-lib/yajl_tree.h \ 
    762   yajl-lib/yajl_common.h yajl-lib/yajl_parse.h yajl-lib/yajl_parser.h \ 
    763   yajl-lib/yajl_bytestack.h yajl-lib/yajl_buf.h yajl-lib/yajl_alloc.h \ 
    764   yajl-lib/yajl_lex.h 
    765  
    766 yajl-lib/yajl_version.o yajl-lib/yajl_version.lo: yajl-lib/yajl_version.c yajl-lib/yajl_version.h \ 
    767   yajl-lib/yajl_common.h 
    768  
    769 libnoit-objs/eventer/eventer_kqueue_impl.o libnoit-objs/eventer/eventer_kqueue_impl.lo: eventer/eventer_kqueue_impl.o 
    770  
    771 libnoit-objs/eventer/eventer_kqueue_impl.lo: eventer/eventer_kqueue_impl.lo 
    772  
    773 libnoit-objs/eventer/eventer_ports_impl.o libnoit-objs/eventer/eventer_ports_impl.lo: eventer/eventer_ports_impl.o 
    774  
    775 libnoit-objs/eventer/eventer_ports_impl.lo: eventer/eventer_ports_impl.lo 
    776  
    777 libnoit-objs/eventer/eventer_epoll_impl.o libnoit-objs/eventer/eventer_epoll_impl.lo: eventer/eventer_epoll_impl.o 
    778  
    779 libnoit-objs/eventer/eventer_epoll_impl.lo: eventer/eventer_epoll_impl.lo 
     647  /opt/circonus/include/mtev_reverse_socket.h stratcon_datastore.h 
     648stratcond.o: stratcond.c /opt/circonus/include/mtev_defines.h \ 
     649  /opt/circonus/include/mtev_config.h \ 
     650  /opt/circonus/include/noitedit/strlcpy.h \ 
     651  /opt/circonus/include/eventer/eventer.h \ 
     652  /opt/circonus/include/mtev_log.h /opt/circonus/include/mtev_hash.h \ 
     653  /opt/circonus/include/mtev_atomic.h \ 
     654  /opt/circonus/include/eventer/eventer_POSIX_fd_opset.h \ 
     655  /opt/circonus/include/eventer/eventer_SSL_fd_opset.h \ 
     656  /opt/circonus/include/eventer/eventer_jobq.h \ 
     657  /opt/circonus/include/mtev_sem.h /opt/circonus/include/mtev_memory.h \ 
     658  /opt/circonus/include/mtev_security.h \ 
     659  /opt/circonus/include/mtev_watchdog.h \ 
     660  /opt/circonus/include/mtev_lockfile.h \ 
     661  /opt/circonus/include/mtev_main.h \ 
     662  /opt/circonus/include/mtev_listener.h \ 
     663  /opt/circonus/include/mtev_console.h \ 
     664  /opt/circonus/include/noitedit/histedit.h \ 
     665  /opt/circonus/include/mtev_console_telnet.h \ 
     666  /opt/circonus/include/mtev_skiplist.h \ 
     667  /opt/circonus/include/mtev_conf.h \ 
     668  /usr/local/Cellar/pcre/8.33/include/pcre.h \ 
     669  /opt/circonus/include/mtev_rest.h /opt/circonus/include/mtev_http.h \ 
     670  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/tree.h \ 
     671  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlversion.h \ 
     672  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlexports.h \ 
     673  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlstring.h \ 
     674  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlregexp.h \ 
     675  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/dict.h \ 
     676  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlmemory.h \ 
     677  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/threads.h \ 
     678  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/globals.h \ 
     679  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/parser.h \ 
     680  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/hash.h \ 
     681  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/valid.h \ 
     682  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlerror.h \ 
     683  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/list.h \ 
     684  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlautomata.h \ 
     685  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/entities.h \ 
     686  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/encoding.h \ 
     687  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xmlIO.h \ 
     688  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX.h \ 
     689  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/xlink.h \ 
     690  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml/SAX2.h \ 
     691  /opt/circonus/include/mtev_hooks.h \ 
     692  /opt/circonus/include/mtev_reverse_socket.h \ 
     693  /opt/circonus/include/mtev_events_rest.h \ 
     694  /opt/circonus/include/mtev_capabilities_listener.h noit_mtev_bridge.h \ 
     695  noit_config.h noit_module.h /opt/circonus/include/mtev_dso.h \ 
     696  noit_check.h noit_metric.h stratcon_jlog_streamer.h \ 
     697  stratcon_datastore.h stratcon_realtime_http.h stratcon_iep.h \ 
     698  man/stratcond.usage.h 
     699udns/dnsget.o: udns/dnsget.c udns/udns.h udns/getopt.c 
     700udns/ex-rdns.o: udns/ex-rdns.c udns/udns.h 
     701udns/getopt.o: udns/getopt.c 
     702udns/inet_XtoX.o: udns/inet_XtoX.c 
     703udns/rblcheck.o: udns/rblcheck.c udns/udns.h udns/getopt.c 
     704udns/udns_XtoX.o: udns/udns_XtoX.c udns/udns.h udns/inet_XtoX.c 
     705udns/udns_bl.o: udns/udns_bl.c udns/udns.h 
     706udns/udns_codes.o: udns/udns_codes.c udns/udns.h 
     707udns/udns_dn.o: udns/udns_dn.c udns/udns.h 
     708udns/udns_dntosp.o: udns/udns_dntosp.c udns/udns.h 
     709udns/udns_init.o: udns/udns_init.c udns/udns.h 
     710udns/udns_jran.o: udns/udns_jran.c udns/udns.h 
     711udns/udns_misc.o: udns/udns_misc.c udns/udns.h 
     712udns/udns_parse.o: udns/udns_parse.c udns/udns.h 
     713udns/udns_resolver.o: udns/udns_resolver.c udns/udns.h 
     714udns/udns_rr_a.o: udns/udns_rr_a.c udns/udns.h 
     715udns/udns_rr_mx.o: udns/udns_rr_mx.c udns/udns.h 
     716udns/udns_rr_naptr.o: udns/udns_rr_naptr.c udns/udns.h 
     717udns/udns_rr_ptr.o: udns/udns_rr_ptr.c udns/udns.h 
     718udns/udns_rr_srv.o: udns/udns_rr_srv.c udns/udns.h 
     719udns/udns_rr_txt.o: udns/udns_rr_txt.c udns/udns.h 
  • src/Makefile.in

    r3745843 r304ec80  
    11.SUFFIXES: .lo .re .c 
     2 
     3Q= 
     4ifeq ($(V),) 
     5        Q=@ 
     6endif 
    27 
    38LIBNOIT_VERSION=0.0.1 
     
    3641SHLDFLAGS=@SHLDFLAGS@ 
    3742LIBNOIT_LIBS=@LIBNOIT_LIBS@ 
    38 LIBNOITLL_LIBS=@LIBNOITLL_LIBS@ 
    3943DEPFLAGS=@DEPFLAGS@ 
    4044MODULELD=@MODULELD@ 
     
    5458NOITD_DTRACEOBJ=$(DTRACEOBJ:%dtrace_stub.o=noitd_%dtrace_stub.o) 
    5559STRATCOND_DTRACEOBJ=$(DTRACEOBJ:%dtrace_stub.o=stratcond_%dtrace_stub.o) 
    56 LIBNOIT_DTRACEOBJ=$(DTRACEOBJ:%dtrace_stub.o=libnoit_%dtrace_stub.lo) 
    5760LIBNOIT_V=libnoit@DOTSO@.$(LIBNOIT_VERSION)@DOTDYLIB@ 
    5861LIBNOIT=libnoit@DOTSO@@DOTDYLIB@ 
    59 LIBNOITLL_V=libnoit-ll@DOTSO@.$(LIBNOIT_VERSION)@DOTDYLIB@ 
    60 LIBNOITLL=libnoit-ll@DOTSO@@DOTDYLIB@ 
    6162 
    6263TARGETS=noitd stratcond noit.conf test-noit.conf stratcon.conf test-stratcon.conf \ 
    63         $(LIBNOIT) $(LIBNOITLL) @MDB_MODS@ 
     64        $(LIBNOIT) @MDB_MODS@ 
    6465 
    6566all:    reversion $(TARGETS) java-bits make-modules make-man 
    6667 
    6768MODDIR=modules 
     69 
     70HEADERS=noit_metric.h noit_check_log_helpers.h noit_check_tools_shared.h \ 
     71        stratcon_ingest.h 
    6872 
    6973NOIT_HEADERS=noit_check.h noit_check_resolver.h \ 
     
    7680        stratcon_realtime_http.h 
    7781 
    78 HEADERS=noit_metric.h noit_capabilities_listener.h noit_conf.h noit_version.h \ 
    79         noit_check_log_helpers.h noit_check_tools_shared.h \ 
    80         noit_config.h noit_console.h noit_console_telnet.h \ 
    81         noit_defines.h noit_events_rest.h \ 
    82         noit_http.h noit_listener.h \ 
    83         noit_main.h noit_dso.h noit_reverse_socket.h noit_rest.h \ 
    84         noit_tokenizer.h noit_xml.h \ 
    85   stratcon_ingest.h \ 
    86         eventer/OETS_asn1_helper.h eventer/eventer.h \ 
    87         eventer/eventer_POSIX_fd_opset.h eventer/eventer_SSL_fd_opset.h \ 
    88         eventer/eventer_jobq.h \ 
    89         utils/noit_atomic.h utils/noit_b64.h utils/noit_hash.h \ 
    90         utils/noit_log.h utils/noit_mkdir.h utils/noit_security.h \ 
    91         utils/noit_sem.h utils/noit_skiplist.h utils/noit_str.h \ 
    92         utils/noit_watchdog.h utils/noit_lockfile.h \ 
    93         utils/noit_hooks.h \ 
    94         noitedit/chared.h noitedit/common.h noitedit/compat.h noitedit/el.h \ 
    95         noitedit/el_term.h noitedit/emacs.h noitedit/fcns.h noitedit/fgetln.h \ 
    96         noitedit/help.h noitedit/hist.h noitedit/histedit.h noitedit/key.h \ 
    97         noitedit/map.h noitedit/parse.h noitedit/prompt.h noitedit/refresh.h \ 
    98         noitedit/search.h noitedit/sig.h noitedit/strlcpy.h noitedit/sys.h \ 
    99         noitedit/tokenizer.h noitedit/tty.h noitedit/vi.h \ 
    100         json-lib/arraylist.h json-lib/bits.h json-lib/debug.h \ 
    101         json-lib/json_object_private.h json-lib/json_object.h \ 
    102         json-lib/json_tokener.h json-lib/json_util.h json-lib/json.h \ 
    103         json-lib/linkhash.h json-lib/printbuf.h \ 
    104         yajl-lib/yajl_alloc.h yajl-lib/yajl_buf.h yajl-lib/yajl_bytestack.h \ 
    105         yajl-lib/yajl_common.h yajl-lib/yajl_encode.h yajl-lib/yajl_gen.h \ 
    106         yajl-lib/yajl_lex.h yajl-lib/yajl_parse.h yajl-lib/yajl_parser.h \ 
    107         yajl-lib/yajl_tree.h yajl-lib/yajl_version.h 
    108  
    109  
    11082UDNS_LIB_OBJS=udns/udns_dn.o udns/udns_dntosp.o udns/udns_parse.o \ 
    11183        udns/udns_resolver.o udns/udns_init.o udns/udns_misc.o \ 
     
    11385        udns/udns_rr_txt.o udns/udns_bl.o udns/udns_rr_srv.o \ 
    11486        udns/udns_rr_naptr.o udns/udns_codes.o udns/udns_jran.o 
    115 JSON_LIB_OBJS=json-lib/arraylist.lo json-lib/debug.lo json-lib/json_object.lo \ 
    116         json-lib/json_tokener.lo json-lib/json_util.lo json-lib/linkhash.lo \ 
    117         json-lib/printbuf.lo 
    118 NOITEDIT_LIB_OBJS=noitedit/chared.lo noitedit/common.lo noitedit/el.lo \ 
    119         noitedit/emacs.lo noitedit/fcns.lo noitedit/fgetln.lo noitedit/help.lo \ 
    120         noitedit/hist.lo noitedit/history.lo noitedit/key.lo noitedit/map.lo \ 
    121         noitedit/parse.lo noitedit/prompt.lo noitedit/read.lo noitedit/readline.lo \ 
    122         noitedit/refresh.lo noitedit/search.lo noitedit/sig.lo noitedit/strlcpy.lo \ 
    123         noitedit/term.lo noitedit/tokenizer.lo noitedit/tty.lo noitedit/vi.lo 
    124 EVENTER_OBJS=@EVENTER_OBJS@ 
    125 EVENTER_IMPL_OBJS=$(EVENTER_OBJS:%.lo=eventer/%.lo) 
    126 ATOMIC_REL_OBJS=@ATOMIC_OBJS@ 
    127 ATOMIC_OBJS=$(ATOMIC_REL_OBJS:%.lo=utils/%.lo) 
    128 EVENTER_LIB_OBJS=eventer/OETS_asn1_helper.lo eventer/eventer.lo \ 
    129         eventer/eventer_POSIX_fd_opset.lo eventer/eventer_SSL_fd_opset.lo \ 
    130         eventer/eventer_impl.lo eventer/eventer_jobq.lo $(EVENTER_IMPL_OBJS) 
    131 NOIT_UTILS_OBJS=utils/noit_b32.lo utils/noit_b64.lo utils/noit_btrie.lo \ 
    132         utils/noit_getip.lo utils/noit_hash.lo utils/noit_lockfile.lo \ 
    133         utils/noit_log.lo utils/noit_mkdir.lo utils/noit_security.lo \ 
    134         utils/noit_sem.lo utils/noit_skiplist.lo utils/noit_str.lo \ 
    135         utils/noit_watchdog.lo utils/noit_memory.lo $(ATOMIC_OBJS) 
    136 YAJL_LIB_OBJS=yajl-lib/yajl.lo yajl-lib/yajl_alloc.lo yajl-lib/yajl_buf.lo \ 
    137         yajl-lib/yajl_encode.lo yajl-lib/yajl_gen.lo yajl-lib/yajl_lex.lo \ 
    138         yajl-lib/yajl_parser.lo yajl-lib/yajl_tree.lo yajl-lib/yajl_version.lo 
    139  
    14087ENABLE_LUA=@ENABLE_LUA@ 
    14188LUALIBS=@LUALIBS@ 
    14289 
    143 LIBNOIT_OBJS=noit_main.lo noit_listener.lo \ 
    144         noit_console.lo noit_console_state.lo noit_console_telnet.lo \ 
    145         noit_console_complete.lo noit_xml.lo \ 
    146         noit_conf.lo noit_http.lo noit_rest.lo noit_tokenizer.lo \ 
    147         noit_reverse_socket.lo \ 
    148         noit_capabilities_listener.lo noit_dso.lo \ 
    149         noit_events_rest.lo \ 
    150         $(NOITEDIT_LIB_OBJS) $(EVENTER_LIB_OBJS) \ 
    151         $(NOIT_UTILS_OBJS) $(JSON_LIB_OBJS) $(YAJL_LIB_OBJS) 
    152  
    153 LIBNOITLL_OBJS=noit_check_log_helpers.lo bundle.pb-c.lo \ 
     90LIBNOIT_OBJS=noit_check_log_helpers.lo bundle.pb-c.lo \ 
    15491        noit_check_tools_shared.lo stratcon_ingest.lo 
    15592 
    156 NOIT_OBJS=noitd.o
     93NOIT_OBJS=noitd.o noit_mtev_bridge.o
    15794        noit_check_resolver.o \ 
    15895        noit_check.o noit_check_log.o noit_check_tools.o \ 
     
    16097        noit_jlog_listener.o noit_livestream_listener.o noit_filters.o \ 
    16198        noit_check_rest.o noit_filters_rest.o \ 
    162         $(UDNS_LIB_OBJS) \ 
    163         $(LUA_OBJS) 
    164  
    165 STRATCON_OBJS=stratcond.o \ 
     99        $(UDNS_LIB_OBJS) 
     100 
     101STRATCON_OBJS=stratcond.o noit_mtev_bridge.o \ 
    166102        stratcon_realtime_http.o \ 
    167103        stratcon_jlog_streamer.o stratcon_datastore.o \ 
     
    172108FINAL_NOIT_OBJS=$(NOIT_OBJS:%.o=noit-objs/%.o) 
    173109FINAL_LIBNOIT_OBJS=$(LIBNOIT_OBJS:%.lo=libnoit-objs/%.lo) 
    174 FINAL_LIBNOITLL_OBJS=$(LIBNOITLL_OBJS:%.lo=libnoit-ll-objs/%.lo) 
    175110 
    176111noit-objs/%.o:  %.o 
     
    192127        fi 
    193128 
    194 libnoit-ll-objs/%.lo: %.lo 
     129libnoit-objs/%.lo:    %.lo 
    195130        @mkdir -p "`dirname $@`" 
    196131        @echo "- making private $@" 
    197         @cp $(@:libnoit-ll-objs/%.lo=%.lo) $@ 
     132        @cp $(@:libnoit-objs/%.lo=%.lo) $@ 
    198133        @if test -x "$(CTFCONVERT)" ; then \ 
    199134                echo "- making CTF ($@)" ; \ 
     
    250185        ln -sf $(LIBNOIT_V) $(LIBNOIT) 
    251186 
    252 $(LIBNOIT_V):   $(FINAL_LIBNOIT_OBJS) $(LIBNOIT_DTRACEOBJ) 
     187$(LIBNOIT_V):   $(FINAL_LIBNOIT_OBJS) 
    253188        @echo "- linking $@" 
    254         $(SHLD) $(SHLDFLAGS) -o $@ @LD_LIBNOIT_VERSION@ $(FINAL_LIBNOIT_OBJS) $(LIBNOIT_DTRACEOBJ) $(LIBNOIT_LIBS) 
    255  
    256 $(LIBNOITLL):   $(LIBNOITLL_V) 
    257         ln -sf $(LIBNOITLL_V) $(LIBNOITLL) 
    258  
    259 $(LIBNOITLL_V): $(FINAL_LIBNOITLL_OBJS) $(LIBNOIT) 
    260         @echo "- linking $@" 
    261         $(SHLD) $(SHLDFLAGS) -o $@ @LD_LIBNOITLL_VERSION@ $(FINAL_LIBNOITLL_OBJS) $(LIBNOITLL_LIBS) -L. -lnoit 
    262  
    263 $(LIBNOIT_DTRACEOBJ):    $(FINAL_LIBNOIT_OBJS) 
    264         @echo "- assembling $@" 
    265         @DTRACE@ @DTRACEFLAGS@ -Z -G -s libnoit_dtrace_probes.d -o $(LIBNOIT_DTRACEOBJ) $(FINAL_LIBNOIT_OBJS) 
     189        $(SHLD) $(SHLDFLAGS) -o $@ @LD_LIBNOIT_VERSION@ $(FINAL_LIBNOIT_OBJS) $(LIBNOIT_LIBS) -L. -lmtev 
    266190 
    267191stratcond_@DTRACEOBJ@:    $(FINAL_STRATCON_OBJS) 
     
    272196        @echo "- assembling $@" && \ 
    273197        @DTRACE@ @DTRACEFLAGS@ -Z -G -s noit_dtrace_probes.d -o noitd_@DTRACEOBJ@ $(FINAL_NOIT_OBJS) 
    274  
    275 libnoit_@DTRACEHDR@:    libnoit_dtrace_probes.d 
    276         @if test -z "@DTRACE@" ; then \ 
    277                 echo "- faking dtrace header" ; \ 
    278                 cp ./libnoit_@DTRACEHDR@.stock ./libnoit_@DTRACEHDR@ ; \ 
    279         else \ 
    280                 echo "- building dtrace header $@" ; \ 
    281                 @DTRACE@ -h -s libnoit_dtrace_probes.d ; \ 
    282         fi 
    283198 
    284199noit_@DTRACEHDR@:    noit_dtrace_probes.d 
     
    300215        fi 
    301216 
    302 noitd:  $(FINAL_NOIT_OBJS) man/noitd.usage.h $(NOITD_DTRACEOBJ) $(LIBNOIT) $(LIBNOITLL) 
     217noitd:  $(FINAL_NOIT_OBJS) man/noitd.usage.h $(NOITD_DTRACEOBJ) $(LIBNOIT) 
    303218        @echo "- linking $@" 
    304219        @$(CC) $(CLINKFLAGS) -o $@ $(FINAL_NOIT_OBJS) \ 
     
    306221                $(LDFLAGS) \ 
    307222                $(MAPFLAGS) \ 
    308                 $(LIBS) -L. -lnoit -lnoit-ll $(LUALIBS) -ljlog 
     223                $(LIBS) -L. -lmtev -lnoit $(LUALIBS) -ljlog 
    309224        @if test -x "$(CTFMERGE)" ; then \ 
    310225                $(CTFMERGE) -g -l @VERSION@ -o $@ $(FINAL_NOIT_OBJS) $(NOITD_DTRACEOBJ) ; \ 
    311226        fi 
    312227 
    313 stratcond:      $(FINAL_STRATCON_OBJS) $(STRATCOND_DTRACEOBJ) $(LIBNOIT) $(LIBNOITLL) 
     228stratcond:      $(FINAL_STRATCON_OBJS) $(STRATCOND_DTRACEOBJ) $(LIBNOIT) 
    314229        @echo "- linking $@" 
    315230        $(CC) $(CLINKFLAGS) -o $@ $(FINAL_STRATCON_OBJS) \ 
     
    317232                $(LDFLAGS) \ 
    318233                $(MAPFLAGS) \ 
    319                 $(LIBS) -L. -lnoit -lnoit-ll 
     234                $(LIBS) -L. -lmtev -lnoit 
    320235        @if test -x "$(CTFMERGE)" ; then \ 
    321236                $(CTFMERGE) -g -l @VERSION@ -o $@ $(FINAL_STRATCON_OBJS) $(STRATCOND_DTRACEOBJ) ; \ 
     
    326241        @$(CC) -Imdb-support $(CPPFLAGS) $(SHCFLAGS) $(CFLAGS) -o $@ -c $< 
    327242 
    328 SHAREDMDBMODSRC=mdb-support/noitutils.c mdb-support/eventer.c 
    329  
    330 mdb-support/libnoit.lo: mdb-support/libnoit.c $(SHAREDMDBMODSRC) 
    331         @echo "- compiling $@" 
    332         @$(CC) -Imdb-support $(CPPFLAGS) $(SHCFLAGS) $(CFLAGS) -o $@ -c $< 
    333  
    334 mdb-support/libnoit.so: mdb-support/libnoit.lo mdb-support/mdb_help.lo 
    335         @echo "- linking $@" 
    336         @$(MODULELD) $(SHLDFLAGS) -o $@ mdb-support/libnoit.lo mdb-support/mdb_help.lo 
     243SHAREDMDBMODSRC= 
    337244 
    338245stratcon_datastore.o:   stratcon_datastore.c 
     
    341248 
    342249.c.lo: 
    343         @if [ "`dirname $@`" != "." ] ; then \ 
     250        $(Q)if [ "`dirname $@`" != "." ] ; then \ 
    344251                (cd "`dirname $@`" && $(MAKE) "`basename $@`") ; \ 
    345252        else \ 
     
    349256 
    350257.c.o: 
    351         @if [ "`dirname $@`" != "." ] ; then \ 
     258        $(Q)if [ "`dirname $@`" != "." ] ; then \ 
    352259                (cd "`dirname $@`" && $(MAKE) "`basename $@`") ; \ 
    353260        else \ 
     
    359266        @(cd udns && $(MAKE) udns_codes.c) 
    360267 
    361 utils/noit_atomic_sol_sparcv8plus.o:    utils/noit_atomic_sol.s 
    362         @(cd utils && $(MAKE) noit_atomic_sol_sparcv8plus.o) 
    363  
    364 utils/noit_atomic_sol_sparcv9.o:        utils/noit_atomic_sol.s 
    365         @(cd utils && $(MAKE) noit_atomic_sol_sparcv9.o) 
    366  
    367 utils/noit_atomic_sol_x86_32.o: utils/noit_atomic_sol.s 
    368         @(cd utils && $(MAKE) noit_atomic_sol_x86_32.o) 
    369  
    370 utils/noit_atomic_sol_x86_64.o: utils/noit_atomic_sol.s 
    371         @(cd utils && $(MAKE) noit_atomic_sol_x86_64.o) 
    372  
    373268noit_module.o:  module-online.h 
    374269 
     
    376271        @echo "- making module-online.h (StyleSheet include)" 
    377272        @$(XML2H) helpStyleXML < modules/module-online.xsl > $@ 
    378  
    379 noit_tokenizer.c: 
    380         @echo "- re2c noit_tokenizer.re" 
    381         @re2c -o $@ noit_tokenizer.re 
    382273 
    383274test-noit.conf: noit.conf.in Makefile 
     
    441332        $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(bindir) 
    442333        $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir) 
    443         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/eventer 
    444         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/utils 
    445         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/noitedit 
    446         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/json-lib 
    447         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/yajl-lib 
    448334        $(INSTALL) -m 0755 ../buildtools/xml2h $(DESTDIR)$(bindir)/noit-xml2h 
    449335        $(INSTALL) -m 0755 scripts/noit-config $(DESTDIR)$(bindir)/noit-config 
     
    452338        done 
    453339 
    454 noitlibs:       $(LIBNOIT_V) $(LIBNOITLL_V) @MDB_MODS@ 
     340noitlibs:       $(LIBNOIT_V) @MDB_MODS@ 
    455341 
    456342install-libs:    noitlibs 
     
    458344        $(INSTALL) -m 0755 $(LIBNOIT_V) $(DESTDIR)$(libdir)/$(LIBNOIT_V) 
    459345        ln -sf $(LIBNOIT_V) $(DESTDIR)$(libdir)/$(LIBNOIT) 
    460         $(INSTALL) -m 0755 $(LIBNOITLL_V) $(DESTDIR)$(libdir)/$(LIBNOITLL_V) 
    461         ln -sf $(LIBNOITLL_V) $(DESTDIR)$(libdir)/$(LIBNOITLL) 
    462         if test -n "@MDB_MODS@" ; then \ 
    463                 $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)/usr/lib/mdb/proc/amd64 ; \ 
    464                 $(INSTALL) -m 0755 mdb-support/libnoit.so $(DESTDIR)/usr/lib/mdb/proc/amd64/libnoit.so ; \ 
    465         fi 
    466346 
    467347install-noitd:  install-libs install-noitd-nolibs 
     
    495375 
    496376clean: 
    497         rm -f *.lo *.o $(TARGETS) $(LUA_OBJS) 
    498         rm -f $(LIBNOIT) $(LIBNOIT_V) $(LIBNOITLL) $(LIBNOITLL_V) 
     377        rm -f *.lo *.o $(TARGETS) 
     378        rm -f $(LIBNOIT) 
    499379        rm -f module-online.h noit.env 
    500         rm -rf noit-objs stratcon-objs libnoit-objs libnoit-ll-objs 
     380        rm -rf noit-objs stratcon-objs libnoit-objs 
    501381        rm -rf mdb-support/*.lo mdb-support/*.so 
    502         (cd eventer && $(MAKE) clean) 
    503382        (cd udns && $(MAKE) clean) 
    504383        (cd man && $(MAKE) clean) 
    505384        (cd modules && $(MAKE) clean) 
    506         (cd noitedit && $(MAKE) clean) 
    507         (cd utils && $(MAKE) clean) 
    508         (cd json-lib && $(MAKE) clean) 
    509         (cd yajl-lib && $(MAKE) clean) 
    510385        (cd java && $(MAKE) clean) 
    511386 
    512387Makefile.noit.dep: 
    513         find noit-objs -name \*.o | grep -v 'eventer_.*_impl.o' | sort | awk '{gsub("^.+-objs/", ""); print "noit-objs/"$$1": "$$1;}' > $@ 
    514         for impl in kqueue ports epoll; do \ 
    515                 echo "noit-objs/eventer/eventer_$${impl}_impl.o: eventer/eventer_$${impl}_impl.o" >> $@ ; \ 
    516                 echo "noit-objs/eventer/eventer_$${impl}_impl.lo: eventer/eventer_$${impl}_impl.lo" >> $@ ; \ 
    517         done 
     388        find noit-objs -name \*.o | sort | awk '{gsub("^.+-objs/", ""); print "noit-objs/"$$1": "$$1;}' > $@ 
    518389 
    519390Makefile.stratcon.dep: 
    520         find stratcon-objs -name \*.o | grep -v 'eventer_.*_impl.o' | sort | awk '{gsub("^.+-objs/", ""); print "stratcon-objs/"$$1": "$$1;}' > $@ 
    521         for impl in kqueue ports epoll; do \ 
    522                 echo "stratcon-objs/eventer/eventer_$${impl}_impl.o: eventer/eventer_$${impl}_impl.o" >> $@ ; \ 
    523                 echo "stratcon-objs/eventer/eventer_$${impl}_impl.lo: eventer/eventer_$${impl}_impl.lo" >> $@ ; \ 
    524         done 
     391        find stratcon-objs -name \*.o | sort | awk '{gsub("^.+-objs/", ""); print "stratcon-objs/"$$1": "$$1;}' > $@ 
    525392 
    526393Makefile.dep: 
    527394        $(CC) -I. $(CPPFLAGS) $(CFLAGS) $(DEPFLAGS) *.c > Makefile.dep 
    528         for d in utils udns eventer noitedit json-lib yajl-lib; do \ 
    529                 $(CC) -I. $(CPPFLAGS) $(CFLAGS) $(DEPFLAGS) $$d/*.c | \ 
    530                 perl -pe 's#(\s)([^\s\\])#$$1$$2#g; s#^(\S)#'$$d'/$$1#;' >> \ 
    531                 Makefile.dep ; \ 
    532         done 
    533         for impl in kqueue ports epoll; do \ 
    534                 echo "libnoit-objs/eventer/eventer_$${impl}_impl.o: eventer/eventer_$${impl}_impl.o" >> $@ ; \ 
    535                 echo "libnoit-objs/eventer/eventer_$${impl}_impl.lo: eventer/eventer_$${impl}_impl.lo" >> $@ ; \ 
    536         done 
    537         $(top_srcdir)/buildtools/culldeps.sh Makefile.dep 
     395        $(CC) -I. $(CPPFLAGS) $(CFLAGS) $(DEPFLAGS) udns/*.c | \ 
     396                perl -pe 's#(\s)([^\s\\])#$$1$$2#g; s#^(\S)#udns/$$1#;' >> \ 
     397                Makefile.dep 
    538398 
    539399include Makefile.dep 
     
    542402 
    543403distclean-subdirs: 
    544         for dir in eventer udns man modules modules-lua noitedit utils json-lib yajl-lib java ; do \ 
     404        for dir in udns man modules modules-lua java ; do \ 
    545405                (cd $$dir && $(MAKE) distclean) ; \ 
    546406        done 
  • src/Makefile.noit.dep

    r3745843 r304ec80  
    1 noit-objs/LuaJIT/src/lib_aux.o: LuaJIT/src/lib_aux.o 
    2 noit-objs/LuaJIT/src/lib_base.o: LuaJIT/src/lib_base.o 
    3 noit-objs/LuaJIT/src/lib_bit.o: LuaJIT/src/lib_bit.o 
    4 noit-objs/LuaJIT/src/lib_debug.o: LuaJIT/src/lib_debug.o 
    5 noit-objs/LuaJIT/src/lib_ffi.o: LuaJIT/src/lib_ffi.o 
    6 noit-objs/LuaJIT/src/lib_init.o: LuaJIT/src/lib_init.o 
    7 noit-objs/LuaJIT/src/lib_io.o: LuaJIT/src/lib_io.o 
    8 noit-objs/LuaJIT/src/lib_jit.o: LuaJIT/src/lib_jit.o 
    9 noit-objs/LuaJIT/src/lib_math.o: LuaJIT/src/lib_math.o 
    10 noit-objs/LuaJIT/src/lib_os.o: LuaJIT/src/lib_os.o 
    11 noit-objs/LuaJIT/src/lib_package.o: LuaJIT/src/lib_package.o 
    12 noit-objs/LuaJIT/src/lib_string.o: LuaJIT/src/lib_string.o 
    13 noit-objs/LuaJIT/src/lib_table.o: LuaJIT/src/lib_table.o 
    14 noit-objs/LuaJIT/src/lj_alloc.o: LuaJIT/src/lj_alloc.o 
    15 noit-objs/LuaJIT/src/lj_api.o: LuaJIT/src/lj_api.o 
    16 noit-objs/LuaJIT/src/lj_asm.o: LuaJIT/src/lj_asm.o 
    17 noit-objs/LuaJIT/src/lj_bc.o: LuaJIT/src/lj_bc.o 
    18 noit-objs/LuaJIT/src/lj_bcread.o: LuaJIT/src/lj_bcread.o 
    19 noit-objs/LuaJIT/src/lj_bcwrite.o: LuaJIT/src/lj_bcwrite.o 
    20 noit-objs/LuaJIT/src/lj_carith.o: LuaJIT/src/lj_carith.o 
    21 noit-objs/LuaJIT/src/lj_ccall.o: LuaJIT/src/lj_ccall.o 
    22 noit-objs/LuaJIT/src/lj_ccallback.o: LuaJIT/src/lj_ccallback.o 
    23 noit-objs/LuaJIT/src/lj_cconv.o: LuaJIT/src/lj_cconv.o 
    24 noit-objs/LuaJIT/src/lj_cdata.o: LuaJIT/src/lj_cdata.o 
    25 noit-objs/LuaJIT/src/lj_char.o: LuaJIT/src/lj_char.o 
    26 noit-objs/LuaJIT/src/lj_clib.o: LuaJIT/src/lj_clib.o 
    27 noit-objs/LuaJIT/src/lj_cparse.o: LuaJIT/src/lj_cparse.o 
    28 noit-objs/LuaJIT/src/lj_crecord.o: LuaJIT/src/lj_crecord.o 
    29 noit-objs/LuaJIT/src/lj_ctype.o: LuaJIT/src/lj_ctype.o 
    30 noit-objs/LuaJIT/src/lj_debug.o: LuaJIT/src/lj_debug.o 
    31 noit-objs/LuaJIT/src/lj_dispatch.o: LuaJIT/src/lj_dispatch.o 
    32 noit-objs/LuaJIT/src/lj_err.o: LuaJIT/src/lj_err.o 
    33 noit-objs/LuaJIT/src/lj_ffrecord.o: LuaJIT/src/lj_ffrecord.o 
    34 noit-objs/LuaJIT/src/lj_func.o: LuaJIT/src/lj_func.o 
    35 noit-objs/LuaJIT/src/lj_gc.o: LuaJIT/src/lj_gc.o 
    36 noit-objs/LuaJIT/src/lj_gdbjit.o: LuaJIT/src/lj_gdbjit.o 
    37 noit-objs/LuaJIT/src/lj_ir.o: LuaJIT/src/lj_ir.o 
    38 noit-objs/LuaJIT/src/lj_lex.o: LuaJIT/src/lj_lex.o 
    39 noit-objs/LuaJIT/src/lj_lib.o: LuaJIT/src/lj_lib.o 
    40 noit-objs/LuaJIT/src/lj_load.o: LuaJIT/src/lj_load.o 
    41 noit-objs/LuaJIT/src/lj_mcode.o: LuaJIT/src/lj_mcode.o 
    42 noit-objs/LuaJIT/src/lj_meta.o: LuaJIT/src/lj_meta.o 
    43 noit-objs/LuaJIT/src/lj_obj.o: LuaJIT/src/lj_obj.o 
    44 noit-objs/LuaJIT/src/lj_opt_dce.o: LuaJIT/src/lj_opt_dce.o 
    45 noit-objs/LuaJIT/src/lj_opt_fold.o: LuaJIT/src/lj_opt_fold.o 
    46 noit-objs/LuaJIT/src/lj_opt_loop.o: LuaJIT/src/lj_opt_loop.o 
    47 noit-objs/LuaJIT/src/lj_opt_mem.o: LuaJIT/src/lj_opt_mem.o 
    48 noit-objs/LuaJIT/src/lj_opt_narrow.o: LuaJIT/src/lj_opt_narrow.o 
    49 noit-objs/LuaJIT/src/lj_opt_sink.o: LuaJIT/src/lj_opt_sink.o 
    50 noit-objs/LuaJIT/src/lj_opt_split.o: LuaJIT/src/lj_opt_split.o 
    51 noit-objs/LuaJIT/src/lj_parse.o: LuaJIT/src/lj_parse.o 
    52 noit-objs/LuaJIT/src/lj_record.o: LuaJIT/src/lj_record.o 
    53 noit-objs/LuaJIT/src/lj_snap.o: LuaJIT/src/lj_snap.o 
    54 noit-objs/LuaJIT/src/lj_state.o: LuaJIT/src/lj_state.o 
    55 noit-objs/LuaJIT/src/lj_str.o: LuaJIT/src/lj_str.o 
    56 noit-objs/LuaJIT/src/lj_strscan.o: LuaJIT/src/lj_strscan.o 
    57 noit-objs/LuaJIT/src/lj_tab.o: LuaJIT/src/lj_tab.o 
    58 noit-objs/LuaJIT/src/lj_trace.o: LuaJIT/src/lj_trace.o 
    59 noit-objs/LuaJIT/src/lj_udata.o: LuaJIT/src/lj_udata.o 
    60 noit-objs/LuaJIT/src/lj_vm.o: LuaJIT/src/lj_vm.o 
    61 noit-objs/LuaJIT/src/lj_vmevent.o: LuaJIT/src/lj_vmevent.o 
    62 noit-objs/LuaJIT/src/lj_vmmath.o: LuaJIT/src/lj_vmmath.o 
    63 noit-objs/bundle.pb-c.o: bundle.pb-c.o 
    64 noit-objs/noit_check.o: noit_check.o 
    65 noit-objs/noit_check_log.o: noit_check_log.o 
    66 noit-objs/noit_check_log_helpers.o: noit_check_log_helpers.o 
    67 noit-objs/noit_check_resolver.o: noit_check_resolver.o 
    68 noit-objs/noit_check_rest.o: noit_check_rest.o 
    69 noit-objs/noit_check_tools.o: noit_check_tools.o 
    70 noit-objs/noit_check_tools_shared.o: noit_check_tools_shared.o 
    71 noit-objs/noit_conf_checks.o: noit_conf_checks.o 
    72 noit-objs/noit_filters.o: noit_filters.o 
    73 noit-objs/noit_filters_rest.o: noit_filters_rest.o 
    74 noit-objs/noit_jlog_listener.o: noit_jlog_listener.o 
    75 noit-objs/noit_livestream_listener.o: noit_livestream_listener.o 
    76 noit-objs/noit_module.o: noit_module.o 
    77 noit-objs/noitd.o: noitd.o 
    78 noit-objs/udns/udns_XtoX.o: udns/udns_XtoX.o 
    79 noit-objs/udns/udns_bl.o: udns/udns_bl.o 
    80 noit-objs/udns/udns_codes.o: udns/udns_codes.o 
    81 noit-objs/udns/udns_dn.o: udns/udns_dn.o 
    82 noit-objs/udns/udns_dntosp.o: udns/udns_dntosp.o 
    83 noit-objs/udns/udns_init.o: udns/udns_init.o 
    84 noit-objs/udns/udns_jran.o: udns/udns_jran.o 
    85 noit-objs/udns/udns_misc.o: udns/udns_misc.o 
    86 noit-objs/udns/udns_parse.o: udns/udns_parse.o 
    87 noit-objs/udns/udns_resolver.o: udns/udns_resolver.o 
    88 noit-objs/udns/udns_rr_a.o: udns/udns_rr_a.o 
    89 noit-objs/udns/udns_rr_mx.o: udns/udns_rr_mx.o 
    90 noit-objs/udns/udns_rr_naptr.o: udns/udns_rr_naptr.o 
    91 noit-objs/udns/udns_rr_ptr.o: udns/udns_rr_ptr.o 
    92 noit-objs/udns/udns_rr_srv.o: udns/udns_rr_srv.o 
    93 noit-objs/udns/udns_rr_txt.o: udns/udns_rr_txt.o 
    94 noit-objs/eventer/eventer_kqueue_impl.o: eventer/eventer_kqueue_impl.o 
    95 noit-objs/eventer/eventer_kqueue_impl.lo: eventer/eventer_kqueue_impl.lo 
    96 noit-objs/eventer/eventer_ports_impl.o: eventer/eventer_ports_impl.o 
    97 noit-objs/eventer/eventer_ports_impl.lo: eventer/eventer_ports_impl.lo 
    98 noit-objs/eventer/eventer_epoll_impl.o: eventer/eventer_epoll_impl.o 
    99 noit-objs/eventer/eventer_epoll_impl.lo: eventer/eventer_epoll_impl.lo 
  • src/Makefile.stratcon.dep

    r3745843 r304ec80  
    1 stratcon-objs/bundle.pb-c.o: bundle.pb-c.o 
    2 stratcon-objs/noit_check_log_helpers.o: noit_check_log_helpers.o 
    3 stratcon-objs/noit_check_tools_shared.o: noit_check_tools_shared.o 
    4 stratcon-objs/stratcon_datastore.o: stratcon_datastore.o 
    5 stratcon-objs/stratcon_iep.o: stratcon_iep.o 
    6 stratcon-objs/stratcon_jlog_streamer.o: stratcon_jlog_streamer.o 
    7 stratcon-objs/stratcon_realtime_http.o: stratcon_realtime_http.o 
    8 stratcon-objs/stratcond.o: stratcond.o 
    9 stratcon-objs/udns/udns_XtoX.o: udns/udns_XtoX.o 
    10 stratcon-objs/udns/udns_bl.o: udns/udns_bl.o 
    11 stratcon-objs/udns/udns_codes.o: udns/udns_codes.o 
    12 stratcon-objs/udns/udns_dn.o: udns/udns_dn.o 
    13 stratcon-objs/udns/udns_dntosp.o: udns/udns_dntosp.o 
    14 stratcon-objs/udns/udns_init.o: udns/udns_init.o 
    15 stratcon-objs/udns/udns_jran.o: udns/udns_jran.o 
    16 stratcon-objs/udns/udns_misc.o: udns/udns_misc.o 
    17 stratcon-objs/udns/udns_parse.o: udns/udns_parse.o 
    18 stratcon-objs/udns/udns_resolver.o: udns/udns_resolver.o 
    19 stratcon-objs/udns/udns_rr_a.o: udns/udns_rr_a.o 
    20 stratcon-objs/udns/udns_rr_mx.o: udns/udns_rr_mx.o 
    21 stratcon-objs/udns/udns_rr_naptr.o: udns/udns_rr_naptr.o 
    22 stratcon-objs/udns/udns_rr_ptr.o: udns/udns_rr_ptr.o 
    23 stratcon-objs/udns/udns_rr_srv.o: udns/udns_rr_srv.o 
    24 stratcon-objs/udns/udns_rr_txt.o: udns/udns_rr_txt.o 
    25 stratcon-objs/eventer/eventer_kqueue_impl.o: eventer/eventer_kqueue_impl.o 
    26 stratcon-objs/eventer/eventer_kqueue_impl.lo: eventer/eventer_kqueue_impl.lo 
    27 stratcon-objs/eventer/eventer_ports_impl.o: eventer/eventer_ports_impl.o 
    28 stratcon-objs/eventer/eventer_ports_impl.lo: eventer/eventer_ports_impl.lo 
    29 stratcon-objs/eventer/eventer_epoll_impl.o: eventer/eventer_epoll_impl.o 
    30 stratcon-objs/eventer/eventer_epoll_impl.lo: eventer/eventer_epoll_impl.lo 
  • src/modules/Makefile.dep

    r3745843 r304ec80  
    11 
    2 check_test.lo: check_test.c ../noit_defines.h ../noit_config.h \ 
    3   ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h ../noit_conf.h \ 
    4   ../utils/noit_hash.h ../noit_console.h ../eventer/eventer.h \ 
    5   ../utils/noit_log.h ../utils/noit_atomic.h \ 
    6   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    7   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    8   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    9   ../utils/noit_hooks.h \ 
    10   ../noit_check.h ../noit_metric.h ../noit_rest.h ../noit_listener.h \ 
    11   ../noit_http.h \ 
    12   ../noit_check_rest.h ../noit_check_tools.h \ 
    13   ../noit_check_tools_shared.h ../json-lib/json.h ../json-lib/bits.h \ 
    14   ../json-lib/debug.h ../json-lib/linkhash.h ../json-lib/arraylist.h \ 
    15   ../json-lib/json_util.h ../json-lib/json_object.h \ 
    16   ../json-lib/json_tokener.h check_test.xmlh 
    17  
    18 collectd.lo: collectd.c ../noit_defines.h ../noit_config.h \ 
    19   ../noitedit/strlcpy.h ../utils/noit_str.h ../noit_module.h \ 
    20   ../noit_dso.h ../noit_conf.h ../utils/noit_hash.h ../noit_console.h \ 
    21   ../eventer/eventer.h ../utils/noit_log.h ../utils/noit_atomic.h \ 
    22   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    23   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    24   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    25   ../utils/noit_hooks.h \ 
    26   ../noit_check.h ../noit_metric.h ../noit_check_tools.h \ 
    27   ../noit_check_tools_shared.h ../noit_rest.h ../noit_listener.h \ 
    28   ../noit_http.h \ 
    29   ../yajl-lib/yajl_parse.h ../yajl-lib/yajl_common.h ../utils/noit_b64.h \ 
    30   collectd.xmlh 
    31  
    32 custom_config.lo: custom_config.c ../noit_defines.h ../noit_config.h \ 
    33   ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h ../noit_conf.h \ 
    34   ../utils/noit_hash.h ../noit_console.h ../eventer/eventer.h \ 
    35   ../utils/noit_log.h ../utils/noit_atomic.h \ 
    36   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    37   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    38   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    39   ../utils/noit_hooks.h \ 
    40   ../noit_check.h ../noit_metric.h ../noit_check_tools.h \ 
    41   ../noit_check_tools_shared.h ../utils/noit_btrie.h custom_config.xmlh 
    42  
    43 dns.lo: dns.c ../noit_defines.h ../noit_config.h ../noitedit/strlcpy.h \ 
    44   ../noit_module.h ../noit_dso.h ../noit_conf.h ../utils/noit_hash.h \ 
    45   ../noit_console.h ../eventer/eventer.h ../utils/noit_log.h \ 
    46   ../utils/noit_atomic.h ../eventer/eventer_POSIX_fd_opset.h \ 
    47   ../eventer/eventer_SSL_fd_opset.h ../eventer/eventer_jobq.h \ 
    48   ../utils/noit_sem.h ../noitedit/histedit.h ../noit_console_telnet.h \ 
    49   ../utils/noit_skiplist.h  \ 
    50   ../utils/noit_hooks.h ../noit_check.h ../noit_metric.h \ 
     2check_test.lo: check_test.c  \ 
     3  ../noit_mtev_bridge.h \ 
     4  ../noit_module.h  \ 
     5  ../noit_check.h \ 
     6  ../noit_metric.h ../noit_check_rest.h ../noit_check_tools.h \ 
     7  ../noit_check_tools_shared.h  \ 
     8  check_test.xmlh 
     9 
     10collectd.lo: collectd.c  \ 
     11  ../noit_module.h  \ 
     12  ../noit_check.h \ 
     13  ../noit_metric.h ../noit_check_tools.h ../noit_check_tools_shared.h \ 
     14  ../noit_mtev_bridge.h collectd.xmlh 
     15 
     16custom_config.lo: custom_config.c  \ 
     17  ../noit_module.h \ 
     18  ../noit_check.h ../noit_metric.h \ 
     19  ../noit_check_tools.h ../noit_check_tools_shared.h \ 
     20  ../noit_mtev_bridge.h custom_config.xmlh 
     21 
     22dns.lo: dns.c  \ 
     23  ../noit_mtev_bridge.h \ 
     24  ../noit_module.h  \ 
     25  ../noit_check.h ../noit_metric.h \ 
    5126  ../noit_check_tools.h ../noit_check_tools_shared.h ../udns/udns.h \ 
    5227  dns.xmlh 
    5328 
    54 evil1.lo: evil1.c ../noit_defines.h ../noit_config.h ../noitedit/strlcpy.h 
    55  
    56 external.lo: external.c ../noit_defines.h ../noit_config.h \ 
    57   ../noitedit/strlcpy.h  \ 
    58   ../noit_module.h ../noit_dso.h ../noit_conf.h ../utils/noit_hash.h \ 
    59   ../noit_console.h ../eventer/eventer.h ../utils/noit_log.h \ 
    60   ../utils/noit_atomic.h ../eventer/eventer_POSIX_fd_opset.h \ 
    61   ../eventer/eventer_SSL_fd_opset.h ../eventer/eventer_jobq.h \ 
    62   ../utils/noit_sem.h ../noitedit/histedit.h ../noit_console_telnet.h \ 
    63   ../utils/noit_skiplist.h ../utils/noit_hooks.h ../noit_check.h \ 
     29external.lo: external.c  \ 
     30  ../noit_module.h \ 
     31  ../noit_check.h ../noit_metric.h \ 
     32  ../noit_check_tools.h ../noit_check_tools_shared.h \ 
     33  ../noit_mtev_bridge.h external_proc.h external.xmlh 
     34 
     35external_proc.lo: external_proc.c  \ 
     36  ../noit_mtev_bridge.h \ 
     37  external_proc.h  \ 
     38 
     39fq_driver.lo: fq_driver.c  \ 
     40  ../stratcon_iep.h \ 
     41  ../stratcon_datastore.h ../stratcon_realtime_http.h \ 
     42  ../stratcon_jlog_streamer.h \ 
     43  fq_driver.xmlh 
     44 
     45ganglia.lo: ganglia.c  \ 
     46  ../noit_module.h  \ 
     47  ../noit_check.h \ 
    6448  ../noit_metric.h ../noit_check_tools.h ../noit_check_tools_shared.h \ 
    65   ../utils/noit_security.h external_proc.h external.xmlh 
    66  
    67 external_proc.lo: external_proc.c ../noit_defines.h ../noit_config.h \ 
    68   ../noitedit/strlcpy.h ../utils/noit_skiplist.h ../utils/noit_log.h \ 
    69   ../utils/noit_hash.h external_proc.h ../eventer/eventer.h \ 
    70   ../utils/noit_atomic.h ../eventer/eventer_POSIX_fd_opset.h \ 
    71   ../eventer/eventer_SSL_fd_opset.h ../eventer/eventer_jobq.h \ 
    72   ../utils/noit_sem.h 
    73  
    74 fq_driver.lo: fq_driver.c ../noit_defines.h ../noit_config.h \ 
    75   ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h ../noit_conf.h \ 
    76   ../utils/noit_hash.h ../noit_console.h ../eventer/eventer.h \ 
    77   ../utils/noit_log.h ../utils/noit_atomic.h \ 
    78   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    79   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    80   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    81   ../utils/noit_hooks.h \ 
    82   ../noit_check.h ../noit_metric.h ../stratcon_iep.h \ 
    83   ../stratcon_datastore.h ../stratcon_realtime_http.h \ 
    84   ../stratcon_jlog_streamer.h ../noit_reverse_socket.h fq_driver.xmlh 
    85  
    86 ganglia.lo: ganglia.c ../noit_defines.h ../noit_config.h \ 
    87   ../noitedit/strlcpy.h ../utils/noit_str.h ../noit_module.h \ 
    88   ../noit_dso.h ../noit_conf.h ../utils/noit_hash.h ../noit_console.h \ 
    89   ../eventer/eventer.h ../utils/noit_log.h ../utils/noit_atomic.h \ 
    90   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    91   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    92   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    93   ../utils/noit_hooks.h \ 
    94   ../noit_check.h ../noit_metric.h ../noit_check_tools.h \ 
    95   ../noit_check_tools_shared.h ../noit_rest.h ../noit_listener.h \ 
    96   ../noit_http.h \ 
    97   ../utils/noit_b64.h ganglia.xmlh 
    98  
    99 handoff_ingestor.lo: handoff_ingestor.c ../noit_defines.h ../noit_config.h \ 
    100   ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h ../noit_conf.h \ 
    101   ../utils/noit_hash.h ../noit_console.h ../eventer/eventer.h \ 
    102   ../utils/noit_log.h ../utils/noit_atomic.h \ 
    103   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    104   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    105   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    106   ../utils/noit_hooks.h \ 
    107   ../noit_check.h ../noit_metric.h ../utils/noit_b64.h \ 
    108   ../utils/noit_str.h ../utils/noit_mkdir.h ../utils/noit_getip.h \ 
     49  ../noit_mtev_bridge.h ganglia.xmlh 
     50 
     51handoff_ingestor.lo: handoff_ingestor.c \ 
    10952  ../stratcon_datastore.h ../stratcon_realtime_http.h ../stratcon_iep.h \ 
    110   ../stratcon_jlog_streamer.h ../noit_reverse_socket.h ../noit_rest.h \ 
    111   ../noit_listener.h ../noit_http.h \ 
     53  ../stratcon_jlog_streamer.h \ 
    11254  handoff_ingestor.xmlh 
    11355 
    114 histogram.lo: histogram.c ../noit_defines.h ../noit_config.h \ 
    115   ../noitedit/strlcpy.h ../utils/noit_b64.h histogram_impl.h \ 
    116   ../noit_module.h ../noit_dso.h ../noit_conf.h ../utils/noit_hash.h \ 
    117   ../noit_console.h ../eventer/eventer.h ../utils/noit_log.h \ 
    118   ../utils/noit_atomic.h ../eventer/eventer_POSIX_fd_opset.h \ 
    119   ../eventer/eventer_SSL_fd_opset.h ../eventer/eventer_jobq.h \ 
    120   ../utils/noit_sem.h ../noitedit/histedit.h ../noit_console_telnet.h \ 
    121   ../utils/noit_skiplist.h  \ 
    122   ../utils/noit_hooks.h ../noit_check.h ../noit_metric.h \ 
    123   ../noit_check_tools.h ../noit_check_tools_shared.h 
    124  
    125 histogram_impl.lo: histogram_impl.c ../noit_defines.h ../noit_config.h \ 
    126   ../noitedit/strlcpy.h ../utils/noit_log.h ../utils/noit_hash.h \ 
     56histogram.lo: histogram.c  \ 
     57  ../noit_mtev_bridge.h \ 
     58  ../noit_module.h  \ 
     59  ../noit_check.h ../noit_metric.h \ 
     60  ../noit_check_tools.h ../noit_check_tools_shared.h histogram_impl.h 
     61 
     62histogram_impl.lo: histogram_impl.c  \ 
    12763  histogram_impl.h 
    12864 
    129 httptrap.lo: httptrap.c ../noit_defines.h ../noit_config.h \ 
    130   ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h ../noit_conf.h \ 
    131   ../utils/noit_hash.h ../noit_console.h ../eventer/eventer.h \ 
    132   ../utils/noit_log.h ../utils/noit_atomic.h \ 
    133   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    134   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    135   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    136   ../utils/noit_hooks.h \ 
    137   ../noit_check.h ../noit_metric.h ../noit_check_tools.h \ 
    138   ../noit_check_tools_shared.h ../noit_rest.h ../noit_listener.h \ 
    139   ../noit_http.h \ 
    140   ../yajl-lib/yajl_parse.h ../yajl-lib/yajl_common.h httptrap.xmlh 
    141  
    142 ip_acl.lo: ip_acl.c ../noit_defines.h ../noit_config.h \ 
    143   ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h ../noit_conf.h \ 
    144   ../utils/noit_hash.h ../noit_console.h ../eventer/eventer.h \ 
    145   ../utils/noit_log.h ../utils/noit_atomic.h \ 
    146   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    147   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    148   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    149   ../utils/noit_hooks.h \ 
    150   ../noit_check.h ../noit_metric.h ../noit_check_tools.h \ 
    151   ../noit_check_tools_shared.h ../utils/noit_btrie.h ip_acl.xmlh 
     65httptrap.lo: httptrap.c  \ 
     66  ../noit_module.h \ 
     67  ../noit_check.h \ 
     68  ../noit_metric.h ../noit_check_tools.h ../noit_check_tools_shared.h \ 
     69  ../noit_mtev_bridge.h httptrap.xmlh 
     70 
     71ip_acl.lo: ip_acl.c  \ 
     72  ../noit_mtev_bridge.h  \ 
     73  ../noit_module.h  \ 
     74  ../noit_check.h ../noit_metric.h \ 
     75  ../noit_check_tools.h ../noit_check_tools_shared.h ip_acl.xmlh 
    15276 
    15377libstomp.lo: libstomp.c  \ 
    15478  libstomp.h \ 
    15579 
    156 lua.lo: lua.c ../noit_defines.h ../noit_config.h ../noitedit/strlcpy.h \ 
    157   ../noit_conf.h ../utils/noit_hash.h ../noit_console.h \ 
    158   ../eventer/eventer.h ../utils/noit_log.h ../utils/noit_atomic.h \ 
    159   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    160   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    161   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    162   ../noit_dso.h \ 
    163   ../utils/noit_hooks.h ../noit_module.h ../noit_check.h \ 
    164   ../noit_metric.h ../noit_check_tools.h ../noit_check_tools_shared.h \ 
    165   lua_noit.h ../noit_rest.h ../noit_listener.h ../noit_http.h \ 
     80lua.lo: lua.c  \ 
     81  ../noit_config.h ../noit_module.h ../noit_check.h ../noit_metric.h \ 
     82  ../noit_check_tools.h ../noit_check_tools_shared.h \ 
     83  ../noit_mtev_bridge.h lua_noit.h  \ 
    16684  lua.xmlh 
    16785 
    168 lua_bit.lo: lua_bit.c 
    169  
    170 lua_crypto.lo: lua_crypto.c ../noit_defines.h ../noit_config.h \ 
    171   ../noitedit/strlcpy.h ../noit_conf.h ../utils/noit_hash.h \ 
    172   ../noit_console.h ../eventer/eventer.h ../utils/noit_log.h \ 
    173   ../utils/noit_atomic.h ../eventer/eventer_POSIX_fd_opset.h \ 
    174   ../eventer/eventer_SSL_fd_opset.h ../eventer/eventer_jobq.h \ 
    175   ../utils/noit_sem.h ../noitedit/histedit.h ../noit_console_telnet.h \ 
    176   ../utils/noit_skiplist.h  \ 
    177   lua_noit.h ../noit_module.h ../noit_dso.h ../utils/noit_hooks.h \ 
     86lua_bit.lo: lua_bit.c  \ 
     87 
     88lua_crypto.lo: lua_crypto.c  \ 
     89  ../noit_mtev_bridge.h \ 
     90  lua_noit.h  \ 
     91  ../noit_module.h \ 
     92  ../noit_check.h ../noit_metric.h \ 
     93  ../noit_check_tools.h ../noit_check_tools_shared.h 
     94 
     95lua_dns.lo: lua_dns.c  \ 
     96  ../noit_mtev_bridge.h \ 
     97  lua_noit.h  \ 
     98  ../noit_module.h \ 
     99  ../noit_check.h ../noit_metric.h \ 
     100  ../noit_check_tools.h ../noit_check_tools_shared.h ../udns/udns.h 
     101 
     102lua_general.lo: lua_general.c  \ 
     103  ../noit_filters.h \ 
     104  ../noit_check.h ../noit_metric.h lua_noit.h \ 
     105  ../noit_module.h \ 
     106  ../noit_check_tools.h ../noit_check_tools_shared.h lua_http.h 
     107 
     108lua_http.lo: lua_http.c  \ 
     109  lua_http.h \ 
     110  ../noit_module.h ../noit_check.h \ 
     111  ../noit_metric.h lua_noit.h  \ 
     112  ../noit_check_tools.h ../noit_check_tools_shared.h 
     113 
     114lua_lpack.lo: lua_lpack.c lua_noit.h  \ 
     115  ../noit_module.h \ 
     116  ../noit_check.h ../noit_metric.h \ 
     117  ../noit_check_tools.h ../noit_check_tools_shared.h 
     118 
     119lua_noit.lo: lua_noit.c  \ 
     120  ../noit_config.h \ 
     121  ../noit_mtev_bridge.h ../noit_module.h \ 
    178122  ../noit_check.h ../noit_metric.h ../noit_check_tools.h \ 
    179   ../noit_check_tools_shared.h ../noit_rest.h ../noit_listener.h \ 
    180   ../noit_http.h \ 
    181  
    182 lua_dns.lo: lua_dns.c ../noit_defines.h ../noit_config.h \ 
    183   ../noitedit/strlcpy.h ../noit_conf.h ../utils/noit_hash.h \ 
    184   ../noit_console.h ../eventer/eventer.h ../utils/noit_log.h \ 
    185   ../utils/noit_atomic.h ../eventer/eventer_POSIX_fd_opset.h \ 
    186   ../eventer/eventer_SSL_fd_opset.h ../eventer/eventer_jobq.h \ 
    187   ../utils/noit_sem.h ../noitedit/histedit.h ../noit_console_telnet.h
    188   ../utils/noit_skiplist.h
    189   lua_noit.h ../noit_module.h ../noit_dso.h ../utils/noit_hooks.h \ 
     123  ../noit_check_tools_shared.h lua_noit.h \ 
     124 
     125lua_snmp.lo: lua_snmp.c  \ 
     126  lua_noit.h \ 
     127  ../noit_module.h \ 
     128  ../noit_check.h ../noit_metric.h \ 
     129  ../noit_check_tools.h ../noit_check_tools_shared.h 
     130 
     131lua_web.lo: lua_web.c
     132  lua_noit.h
     133  ../noit_module.h \ 
    190134  ../noit_check.h ../noit_metric.h ../noit_check_tools.h \ 
    191   ../noit_check_tools_shared.h ../noit_rest.h ../noit_listener.h \ 
    192   ../noit_http.h \ 
    193   ../udns/udns.h 
    194  
    195 lua_general.lo: lua_general.c ../noit_defines.h ../noit_config.h \ 
    196   ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h ../noit_conf.h \ 
    197   ../utils/noit_hash.h ../noit_console.h ../eventer/eventer.h \ 
    198   ../utils/noit_log.h ../utils/noit_atomic.h \ 
    199   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    200   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    201   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    202   ../utils/noit_hooks.h \ 
    203   ../noit_check.h ../noit_metric.h ../noit_http.h \ 
    204   ../noit_listener.h ../noit_rest.h ../noit_filters.h \ 
    205   ../noit_reverse_socket.h lua_noit.h ../noit_check_tools.h \ 
    206135  ../noit_check_tools_shared.h lua_http.h 
    207136 
    208 lua_http.lo: lua_http.c ../noit_defines.h ../noit_config.h \ 
    209   ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h ../noit_conf.h \ 
    210   ../utils/noit_hash.h ../noit_console.h ../eventer/eventer.h \ 
    211   ../utils/noit_log.h ../utils/noit_atomic.h \ 
    212   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    213   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    214   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    215   ../utils/noit_hooks.h \ 
    216   ../noit_check.h ../noit_metric.h lua_http.h ../noit_http.h \ 
    217   ../noit_listener.h ../noit_rest.h lua_noit.h ../noit_check_tools.h \ 
    218   ../noit_check_tools_shared.h 
    219  
    220 lua_lpack.lo: lua_lpack.c lua_noit.h ../noit_defines.h ../noit_config.h \ 
    221   ../noitedit/strlcpy.h ../noit_conf.h ../utils/noit_hash.h \ 
    222   ../noit_console.h ../eventer/eventer.h ../utils/noit_log.h \ 
    223   ../utils/noit_atomic.h ../eventer/eventer_POSIX_fd_opset.h \ 
    224   ../eventer/eventer_SSL_fd_opset.h ../eventer/eventer_jobq.h \ 
    225   ../utils/noit_sem.h ../noitedit/histedit.h ../noit_console_telnet.h \ 
    226   ../utils/noit_skiplist.h  \ 
    227   ../noit_module.h ../noit_dso.h ../utils/noit_hooks.h ../noit_check.h \ 
    228   ../noit_metric.h ../noit_check_tools.h ../noit_check_tools_shared.h \ 
    229   ../noit_rest.h ../noit_listener.h ../noit_http.h \ 
    230  
    231 lua_noit.lo: lua_noit.c ../noit_defines.h ../noit_config.h \ 
    232   ../noitedit/strlcpy.h \ 
    233   ../noit_conf.h ../utils/noit_hash.h ../noit_console.h \ 
    234   ../eventer/eventer.h ../utils/noit_log.h ../utils/noit_atomic.h \ 
    235   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    236   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    237   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    238   ../noit_module.h \ 
    239   ../noit_dso.h ../utils/noit_hooks.h ../noit_check.h ../noit_metric.h \ 
    240   ../noit_check_tools.h ../noit_check_tools_shared.h \ 
    241   ../noit_reverse_socket.h ../noit_xml.h ../utils/noit_str.h \ 
    242   ../utils/noit_b32.h ../utils/noit_b64.h ../json-lib/json.h \ 
    243   ../json-lib/bits.h ../json-lib/debug.h ../json-lib/linkhash.h \ 
    244   ../json-lib/arraylist.h ../json-lib/json_util.h \ 
    245   ../json-lib/json_object.h ../json-lib/json_tokener.h lua_noit.h \ 
    246   ../noit_rest.h ../noit_listener.h ../noit_http.h 
    247  
    248 lua_snmp.lo: lua_snmp.c ../noit_defines.h ../noit_config.h \ 
    249   ../noitedit/strlcpy.h lua_noit.h ../noit_conf.h ../utils/noit_hash.h \ 
    250   ../noit_console.h ../eventer/eventer.h ../utils/noit_log.h \ 
    251   ../utils/noit_atomic.h ../eventer/eventer_POSIX_fd_opset.h \ 
    252   ../eventer/eventer_SSL_fd_opset.h ../eventer/eventer_jobq.h \ 
    253   ../utils/noit_sem.h ../noitedit/histedit.h ../noit_console_telnet.h \ 
    254   ../utils/noit_skiplist.h  \ 
    255   ../noit_module.h ../noit_dso.h ../utils/noit_hooks.h ../noit_check.h \ 
    256   ../noit_metric.h ../noit_check_tools.h ../noit_check_tools_shared.h \ 
    257   ../noit_rest.h ../noit_listener.h ../noit_http.h \ 
    258  
    259 lua_web.lo: lua_web.c ../noit_defines.h ../noit_config.h \ 
    260   ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h ../noit_conf.h \ 
    261   ../utils/noit_hash.h ../noit_console.h ../eventer/eventer.h \ 
    262   ../utils/noit_log.h ../utils/noit_atomic.h \ 
    263   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    264   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    265   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    266   ../utils/noit_hooks.h \ 
    267   ../noit_check.h ../noit_metric.h ../noit_http.h \ 
    268   ../noit_listener.h ../noit_rest.h lua_noit.h ../noit_check_tools.h \ 
    269   ../noit_check_tools_shared.h lua_http.h 
    270  
    271 mysql.lo: mysql.c ../noit_defines.h ../noit_config.h ../noitedit/strlcpy.h \ 
    272   ../noit_module.h ../noit_dso.h ../noit_conf.h ../utils/noit_hash.h \ 
    273   ../noit_console.h ../eventer/eventer.h ../utils/noit_log.h \ 
    274   ../utils/noit_atomic.h ../eventer/eventer_POSIX_fd_opset.h \ 
    275   ../eventer/eventer_SSL_fd_opset.h ../eventer/eventer_jobq.h \ 
    276   ../utils/noit_sem.h ../noitedit/histedit.h ../noit_console_telnet.h \ 
    277   ../utils/noit_skiplist.h  \ 
    278   ../utils/noit_hooks.h ../noit_check.h ../noit_metric.h \ 
    279   ../noit_check_tools.h ../noit_check_tools_shared.h mysql.xmlh 
    280  
    281 ping_icmp.lo: ping_icmp.c ../noit_defines.h ../noit_config.h \ 
    282   ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h ../noit_conf.h \ 
    283   ../utils/noit_hash.h ../noit_console.h ../eventer/eventer.h \ 
    284   ../utils/noit_log.h ../utils/noit_atomic.h \ 
    285   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    286   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    287   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    288   ../utils/noit_hooks.h \ 
    289   ../noit_check.h ../noit_metric.h ../noit_check_tools.h \ 
    290   ../noit_check_tools_shared.h ping_icmp.xmlh 
    291  
    292 postgres.lo: postgres.c ../noit_defines.h ../noit_config.h \ 
    293   ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h ../noit_conf.h \ 
    294   ../utils/noit_hash.h ../noit_console.h ../eventer/eventer.h \ 
    295   ../utils/noit_log.h ../utils/noit_atomic.h \ 
    296   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    297   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    298   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    299   ../utils/noit_hooks.h \ 
    300   ../noit_check.h ../noit_metric.h ../noit_check_tools.h \ 
    301   ../noit_check_tools_shared.h postgres.xmlh 
    302  
    303 postgres_ingestor.lo: postgres_ingestor.c ../noit_defines.h \ 
    304   ../noit_config.h ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h \ 
    305   ../noit_conf.h ../utils/noit_hash.h ../noit_console.h \ 
    306   ../eventer/eventer.h ../utils/noit_log.h ../utils/noit_atomic.h \ 
    307   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    308   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    309   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    310   ../utils/noit_hooks.h \ 
    311   ../noit_check.h ../noit_metric.h ../utils/noit_b64.h \ 
    312   ../utils/noit_str.h ../utils/noit_mkdir.h ../utils/noit_getip.h \ 
    313   ../utils/noit_watchdog.h ../stratcon_datastore.h \ 
    314   ../stratcon_realtime_http.h ../stratcon_ingest.h ../stratcon_iep.h \ 
    315   ../stratcon_jlog_streamer.h ../noit_reverse_socket.h \ 
    316   ../noit_check_log_helpers.h ../noit_rest.h ../noit_listener.h \ 
    317   ../noit_http.h \ 
    318   postgres_ingestor.xmlh ../bundle.pb-c.h 
    319  
    320 rabbitmq_driver.lo: rabbitmq_driver.c ../noit_defines.h ../noit_config.h \ 
    321   ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h ../noit_conf.h \ 
    322   ../utils/noit_hash.h ../noit_console.h ../eventer/eventer.h \ 
    323   ../utils/noit_log.h ../utils/noit_atomic.h \ 
    324   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    325   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    326   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    327   ../utils/noit_hooks.h \ 
    328   ../noit_check.h ../noit_metric.h ../stratcon_iep.h \ 
     137mysql.lo: mysql.c  \ 
     138  ../noit_config.h ../noit_module.h \ 
     139  ../noit_check.h ../noit_metric.h \ 
     140  ../noit_check_tools.h ../noit_check_tools_shared.h \ 
     141  ../noit_mtev_bridge.h mysql.xmlh 
     142 
     143ping_icmp.lo: ping_icmp.c  \ 
     144  ../noit_mtev_bridge.h \ 
     145  ../noit_module.h  \ 
     146  ../noit_check.h ../noit_metric.h \ 
     147  ../noit_check_tools.h ../noit_check_tools_shared.h ping_icmp.xmlh 
     148 
     149postgres.lo: postgres.c  \ 
     150  ../noit_module.h \ 
     151  ../noit_check.h ../noit_metric.h \ 
     152  ../noit_check_tools.h ../noit_check_tools_shared.h \ 
     153  ../noit_mtev_bridge.h postgres.xmlh 
     154 
     155postgres_ingestor.lo: postgres_ingestor.c \ 
     156  ../noit_mtev_bridge.h \ 
     157  ../noit_module.h  ../noit_check.h \ 
     158  ../noit_metric.h ../stratcon_datastore.h ../stratcon_realtime_http.h \ 
     159  ../stratcon_ingest.h ../stratcon_iep.h ../stratcon_jlog_streamer.h \ 
     160  ../noit_check_log_helpers.h ../bundle.pb-c.h postgres_ingestor.xmlh 
     161 
     162rabbitmq_driver.lo: rabbitmq_driver.c  \ 
     163  ../stratcon_iep.h \ 
    329164  ../stratcon_datastore.h ../stratcon_realtime_http.h \ 
    330   ../stratcon_jlog_streamer.h ../noit_reverse_socket.h \ 
    331   librabbitmq/amqp.h librabbitmq/amqp_framing.h rabbitmq_driver.xmlh 
    332  
    333 resolver_cache.lo: resolver_cache.c ../noit_defines.h ../noit_config.h \ 
    334   ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h ../noit_conf.h \ 
    335   ../utils/noit_hash.h ../noit_console.h ../eventer/eventer.h \ 
    336   ../utils/noit_log.h ../utils/noit_atomic.h \ 
    337   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    338   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    339   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    340   ../utils/noit_hooks.h \ 
    341   ../noit_check.h ../noit_metric.h ../noit_check_resolver.h \ 
    342   ../utils/noit_btrie.h resolver_cache.xmlh 
    343  
    344 selfcheck.lo: selfcheck.c ../noit_defines.h ../noit_config.h \ 
    345   ../noitedit/strlcpy.h ../noit_version.h ../noit_module.h ../noit_dso.h \ 
    346   ../noit_conf.h ../utils/noit_hash.h ../noit_console.h \ 
    347   ../eventer/eventer.h ../utils/noit_log.h ../utils/noit_atomic.h \ 
    348   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    349   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    350   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    351   ../utils/noit_hooks.h \ 
    352   ../noit_check.h ../noit_metric.h ../noit_check_tools.h \ 
    353   ../noit_check_tools_shared.h ../noit_jlog_listener.h selfcheck.xmlh 
    354  
    355 snmp.lo: snmp.c ../noit_defines.h ../noit_config.h ../noitedit/strlcpy.h \ 
    356   ../noit_module.h ../noit_dso.h ../noit_conf.h ../utils/noit_hash.h \ 
    357   ../noit_console.h ../eventer/eventer.h ../utils/noit_log.h \ 
    358   ../utils/noit_atomic.h ../eventer/eventer_POSIX_fd_opset.h \ 
    359   ../eventer/eventer_SSL_fd_opset.h ../eventer/eventer_jobq.h \ 
    360   ../utils/noit_sem.h ../noitedit/histedit.h ../noit_console_telnet.h \ 
    361   ../utils/noit_skiplist.h  \ 
    362   ../utils/noit_hooks.h ../noit_check.h ../noit_metric.h \ 
    363   ../noit_check_tools.h ../noit_check_tools_shared.h snmp.xmlh \ 
    364   snmptrap.xmlh 
    365  
    366 snmp_evil.lo: snmp_evil.c 
    367  
    368 ssh2.lo: ssh2.c ../noit_defines.h ../noit_config.h ../noitedit/strlcpy.h \ 
    369   ../noit_module.h ../noit_dso.h ../noit_conf.h ../utils/noit_hash.h \ 
    370   ../noit_console.h ../eventer/eventer.h ../utils/noit_log.h \ 
    371   ../utils/noit_atomic.h ../eventer/eventer_POSIX_fd_opset.h \ 
    372   ../eventer/eventer_SSL_fd_opset.h ../eventer/eventer_jobq.h \ 
    373   ../utils/noit_sem.h ../noitedit/histedit.h ../noit_console_telnet.h \ 
    374   ../utils/noit_skiplist.h  \ 
    375   ../utils/noit_hooks.h ../noit_check.h ../noit_metric.h \ 
    376   ../noit_check_tools.h ../noit_check_tools_shared.h ssh2.xmlh 
    377  
    378 statsd.lo: statsd.c ../noit_defines.h ../noit_config.h \ 
    379   ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h ../noit_conf.h \ 
    380   ../utils/noit_hash.h ../noit_console.h ../eventer/eventer.h \ 
    381   ../utils/noit_log.h ../utils/noit_atomic.h \ 
    382   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    383   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    384   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    385   ../utils/noit_hooks.h \ 
    386   ../noit_check.h ../noit_metric.h ../noit_check_tools.h \ 
    387   ../noit_check_tools_shared.h statsd.xmlh 
    388  
    389 stomp_driver.lo: stomp_driver.c ../noit_defines.h ../noit_config.h \ 
    390   ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h ../noit_conf.h \ 
    391   ../utils/noit_hash.h ../noit_console.h ../eventer/eventer.h \ 
    392   ../utils/noit_log.h ../utils/noit_atomic.h \ 
    393   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    394   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    395   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    396   ../utils/noit_hooks.h \ 
    397   ../noit_check.h ../noit_metric.h ../stratcon_iep.h \ 
     165  ../stratcon_jlog_streamer.h \ 
     166  librabbitmq/amqp.h \ 
     167  librabbitmq/amqp_framing.h rabbitmq_driver.xmlh 
     168 
     169resolver_cache.lo: resolver_cache.c  \ 
     170  ../noit_mtev_bridge.h \ 
     171  ../noit_module.h \ 
     172  ../noit_check.h ../noit_metric.h \ 
     173  ../noit_check_resolver.h resolver_cache.xmlh 
     174 
     175selfcheck.lo: selfcheck.c  \ 
     176  ../noit_mtev_bridge.h \ 
     177  ../noit_module.h \ 
     178  ../noit_check.h ../noit_metric.h \ 
     179  ../noit_jlog_listener.h ../noit_check_tools.h \ 
     180  ../noit_check_tools_shared.h ../noit_version.h selfcheck.xmlh 
     181 
     182snmp.lo: snmp.c  \ 
     183  ../noit_module.h \ 
     184  ../noit_check.h ../noit_metric.h \ 
     185  ../noit_check_tools.h ../noit_check_tools_shared.h \ 
     186  ../noit_mtev_bridge.h snmp.xmlh snmptrap.xmlh 
     187 
     188ssh2.lo: ssh2.c  \ 
     189  ../noit_module.h \ 
     190  ../noit_check.h ../noit_metric.h \ 
     191  ../noit_check_tools.h ../noit_check_tools_shared.h \ 
     192  ../noit_mtev_bridge.h ssh2.xmlh 
     193 
     194statsd.lo: statsd.c  \ 
     195  ../noit_module.h \ 
     196  ../noit_check.h ../noit_metric.h \ 
     197  ../noit_check_tools.h ../noit_check_tools_shared.h \ 
     198  ../noit_mtev_bridge.h statsd.xmlh 
     199 
     200stomp_driver.lo: stomp_driver.c  \ 
     201  ../stratcon_iep.h \ 
    398202  ../stratcon_datastore.h ../stratcon_realtime_http.h \ 
    399   ../stratcon_jlog_streamer.h ../noit_reverse_socket.h libstomp.h \ 
     203  ../stratcon_jlog_streamer.h \ 
     204  libstomp.h \ 
    400205  stomp_driver.xmlh 
    401206 
    402 test_abort.lo: test_abort.c ../noit_defines.h ../noit_config.h \ 
    403   ../noitedit/strlcpy.h ../noit_module.h ../noit_dso.h ../noit_conf.h \ 
    404   ../utils/noit_hash.h ../noit_console.h ../eventer/eventer.h \ 
    405   ../utils/noit_log.h ../utils/noit_atomic.h \ 
    406   ../eventer/eventer_POSIX_fd_opset.h ../eventer/eventer_SSL_fd_opset.h \ 
    407   ../eventer/eventer_jobq.h ../utils/noit_sem.h ../noitedit/histedit.h \ 
    408   ../noit_console_telnet.h ../utils/noit_skiplist.h \ 
    409   ../utils/noit_hooks.h \ 
    410   ../noit_check.h ../noit_metric.h ../noit_check_tools.h \ 
    411   ../noit_check_tools_shared.h 
     207test_abort.lo: test_abort.c  \ 
     208  ../noit_module.h \ 
     209  ../noit_check.h ../noit_metric.h \ 
     210  ../noit_check_tools.h ../noit_check_tools_shared.h \ 
     211  ../noit_mtev_bridge.h 
  • src/modules/check_test.c

    r1174acf r304ec80  
    11/* 
    2  * Copyright (c) 2011, Circonus, Inc. 
    3  * All rights reserved. 
     2 * Copyright (c) 2011-2015, Circonus, Inc. All rights reserved. 
    43 * 
    54 * Redistribution and use in source and binary forms, with or without 
     
    3130 */ 
    3231 
    33 #include "noit_defines.h" 
     32#include <mtev_defines.h> 
     33 
     34#include <assert.h> 
     35 
     36#include <mtev_rest.h> 
     37#include <mtev_log.h> 
     38 
     39#include "noit_mtev_bridge.h" 
    3440#include "noit_module.h" 
    3541#include "noit_check.h" 
    36 #include "noit_rest.h" 
    3742#include "noit_check_rest.h" 
    38 #include "utils/noit_log.h" 
     43 
    3944#include "check_test.xmlh" 
    4045 
    41 #include <assert.h> 
    42  
    4346static void check_test_schedule_sweeper(); 
    44 static noit_log_stream_t nlerr = NULL; 
    45 static noit_log_stream_t nldeb = NULL; 
     47static mtev_log_stream_t nlerr = NULL; 
     48static mtev_log_stream_t nldeb = NULL; 
    4649 
    4750struct check_test_closure { 
    4851  noit_check_t *check; 
    49   noit_http_rest_closure_t *restc; 
     52  mtev_http_rest_closure_t *restc; 
    5053  enum { WANTS_XML = 0, WANTS_JSON } output; 
    5154}; 
    5255 
    53 static noit_skiplist in_progress; 
     56static mtev_skiplist in_progress; 
    5457static eventer_t sweeper_event = NULL; 
    5558static int default_sweep_interval = 10; /* 10ms seems good */ 
     
    5760static int 
    5861check_complete_heap_key(const void *av, const void *bv) { 
    59   const noit_http_rest_closure_t *restc = av; 
     62  const mtev_http_rest_closure_t *restc = av; 
    6063  const struct check_test_closure *b = bv; 
    6164  if(restc < b->restc) return -1; 
     
    7376 
    7477static int 
    75 check_test_onload(noit_image_t *self) { 
    76   nlerr = noit_log_stream_find("error/checktest"); 
    77   nldeb = noit_log_stream_find("debug/checktest"); 
     78check_test_onload(mtev_image_t *self) { 
     79  nlerr = mtev_log_stream_find("error/checktest"); 
     80  nldeb = mtev_log_stream_find("debug/checktest"); 
    7881  if(!nlerr) nlerr = noit_stderr; 
    7982  if(!nldeb) nldeb = noit_debug; 
    80   noit_skiplist_init(&in_progress); 
    81   noit_skiplist_set_compare(&in_progress, check_complete_heap, 
     83  mtev_skiplist_init(&in_progress); 
     84  mtev_skiplist_set_compare(&in_progress, check_complete_heap, 
    8285                            check_complete_heap_key); 
    8386  return 0; 
     
    8588 
    8689static int 
    87 check_test_config(noit_dso_generic_t *self, noit_hash_table *o) { 
     90check_test_config(mtev_dso_generic_t *self, mtev_hash_table *o) { 
    8891  const char *str; 
    8992  int new_interval = 0; 
    90   if(noit_hash_retr_str(o, "sweep_interval", strlen("sweep_interval"), 
     93  if(mtev_hash_retr_str(o, "sweep_interval", strlen("sweep_interval"), 
    9194                        &str)) 
    9295    new_interval = atoi(str); 
     
    103106  noit_check_t *c = NULL; 
    104107  xmlNodePtr a, co; 
    105   noit_hash_table *conf_hash = NULL; 
    106   noit_hash_table **moptions = NULL; 
     108  mtev_hash_table *conf_hash = NULL; 
     109  mtev_hash_table **moptions = NULL; 
    107110 
    108111  for(a = attr->children; a; a = a->next) { 
     
    143146      tmp_val = xmlNodeGetContent(co); 
    144147      val = strdup(tmp_val ? (char *)tmp_val : ""); 
    145       noit_hash_replace(conf_hash, name, strlen(name), val, free, free); 
     148      mtev_hash_replace(conf_hash, name, strlen(name), val, free, free); 
    146149      xmlFree(tmp_val); 
    147150    } 
     
    153156    for(i=0; i<mod_cnt; i++) { 
    154157      const char *name; 
    155       noit_conf_section_t checks; 
     158      mtev_conf_section_t checks; 
    156159      name = noit_check_registered_module(i); 
    157       checks = noit_conf_get_section(NULL, "/noit/checks"); 
    158       if(name) moptions[i] = noit_conf_get_namespaced_hash(checks, "config", name); 
     160      checks = mtev_conf_get_section(NULL, "/noit/checks"); 
     161      if(name) moptions[i] = mtev_conf_get_namespaced_hash(checks, "config", name); 
    159162    } 
    160163  } 
     
    176179 error: 
    177180  if(conf_hash) { 
    178     noit_hash_destroy(conf_hash, free, free); 
     181    mtev_hash_destroy(conf_hash, free, free); 
    179182    free(conf_hash); 
    180183  } 
     
    182185    for(i=0; i<mod_cnt; i++) { 
    183186      if(moptions[i]) { 
    184         noit_hash_destroy(moptions[i], free, free); 
     187        mtev_hash_destroy(moptions[i], free, free); 
    185188        free(moptions[i]); 
    186189      } 
     
    197200static void 
    198201rest_test_check_result(struct check_test_closure *cl) { 
    199   noit_http_session_ctx *ctx = cl->restc->http_ctx; 
    200  
    201   noitL(nlerr, "Flushing check test result\n"); 
     202  mtev_http_session_ctx *ctx = cl->restc->http_ctx; 
     203 
     204  mtevL(nlerr, "Flushing check test result\n"); 
    202205 
    203206  if(cl->restc->call_closure_free) 
     
    215218 
    216219      doc = noit_check_state_as_json(cl->check, 1); 
    217       noit_http_response_ok(ctx, "application/json"); 
     220      mtev_http_response_ok(ctx, "application/json"); 
    218221      jsonstr = json_object_to_json_string(doc); 
    219       noit_http_response_append(ctx, jsonstr, strlen(jsonstr)); 
    220       noit_http_response_append(ctx, "\n", 1); 
     222      mtev_http_response_append(ctx, jsonstr, strlen(jsonstr)); 
     223      mtev_http_response_append(ctx, "\n", 1); 
    221224      json_object_put(doc); 
    222225    } else { 
     
    229232      state = noit_check_state_as_xml(cl->check, 1); 
    230233      xmlAddChild(root, state); 
    231       noit_http_response_ok(ctx, "text/xml"); 
    232       noit_http_response_xml(ctx, doc); 
     234      mtev_http_response_ok(ctx, "text/xml"); 
     235      mtev_http_response_xml(ctx, doc); 
    233236      xmlFreeDoc(doc); 
    234237    } 
    235     noit_http_response_end(ctx); 
     238    mtev_http_response_end(ctx); 
    236239   
    237     conne = noit_http_connection_event(noit_http_session_connection(ctx)); 
     240    conne = mtev_http_connection_event(mtev_http_session_connection(ctx)); 
    238241    if(conne) { 
    239242      // The event already exists, why re-add it?  Did we want to update it? 
     
    251254                   struct timeval *now) { 
    252255  int left = 0; 
    253   noit_skiplist_node *iter = NULL; 
     256  mtev_skiplist_node *iter = NULL; 
    254257  sweeper_event = NULL; 
    255   iter = noit_skiplist_getlist(&in_progress); 
     258  iter = mtev_skiplist_getlist(&in_progress); 
    256259  while(iter) { 
    257260    struct check_test_closure *cl = iter->data; 
    258261    /* advance here, we might delete */ 
    259     noit_skiplist_next(&in_progress,&iter); 
     262    mtev_skiplist_next(&in_progress,&iter); 
    260263    if(NOIT_CHECK_DISABLED(cl->check)) { 
    261264      if(NOIT_CHECK_SHOULD_RESOLVE(cl->check)) 
     
    265268        cl->check->flags &= ~NP_DISABLED; 
    266269        if(NOIT_CHECK_SHOULD_RESOLVE(cl->check)) 
    267           noitL(nldeb, "translated to %s\n", cl->check->target_ip); 
     270          mtevL(nldeb, "translated to %s\n", cl->check->target_ip); 
    268271        if(m) m->initiate_check(m, cl->check, 1, NULL); 
    269272      } 
     
    272275    else if(NOIT_CHECK_RUNNING(cl->check)) left++; 
    273276    else 
    274       noit_skiplist_remove(&in_progress, cl->restc, 
    275                            (noit_freefunc_t)rest_test_check_result); 
     277      mtev_skiplist_remove(&in_progress, cl->restc, 
     278                           (mtev_freefunc_t)rest_test_check_result); 
    276279  } 
    277280 
     
    295298 
    296299static int 
    297 rest_test_check_err(noit_http_rest_closure_t *restc, 
     300rest_test_check_err(mtev_http_rest_closure_t *restc, 
    298301                    int npats, char **pats) { 
    299   noit_http_response *res = noit_http_session_response(restc->http_ctx); 
    300   noit_skiplist_remove(&in_progress, restc, 
    301                        (noit_freefunc_t)rest_test_check_result); 
    302   if(noit_http_response_complete(res) != noit_true) { 
    303     noit_http_response_standard(restc->http_ctx, 500, "ERROR", "text/html"); 
    304     noit_http_response_end(restc->http_ctx); 
    305   } 
    306   return 0; 
    307 } 
    308 static int 
    309 rest_test_check(noit_http_rest_closure_t *restc, 
     302  mtev_http_response *res = mtev_http_session_response(restc->http_ctx); 
     303  mtev_skiplist_remove(&in_progress, restc, 
     304                       (mtev_freefunc_t)rest_test_check_result); 
     305  if(mtev_http_response_complete(res) != mtev_true) { 
     306    mtev_http_response_standard(restc->http_ctx, 500, "ERROR", "text/html"); 
     307    mtev_http_response_end(restc->http_ctx); 
     308  } 
     309  return 0; 
     310} 
     311static int 
     312rest_test_check(mtev_http_rest_closure_t *restc, 
    310313                int npats, char **pats) { 
    311314  noit_check_t *tcheck; 
    312   noit_http_session_ctx *ctx = restc->http_ctx; 
     315  mtev_http_session_ctx *ctx = restc->http_ctx; 
    313316  int mask, complete = 0; 
    314317  int error_code = 500; 
     
    335338    cl->check = tcheck; 
    336339    cl->restc = restc; 
    337     noit_skiplist_insert(&in_progress, cl); 
     340    mtev_skiplist_insert(&in_progress, cl); 
    338341    check_test_schedule_sweeper(); 
    339342    if(restc->call_closure_free) 
     
    346349 
    347350 error: 
    348   noit_http_response_standard(ctx, error_code, "ERROR", "text/xml"); 
     351  mtev_http_response_standard(ctx, error_code, "ERROR", "text/xml"); 
    349352  doc = xmlNewDoc((xmlChar *)"1.0"); 
    350353  root = xmlNewDocNode(doc, NULL, (xmlChar *)"error", NULL); 
    351354  xmlDocSetRootElement(doc, root); 
    352355  xmlNodeAddContent(root, (xmlChar *)error); 
    353   noit_http_response_xml(ctx, doc); 
    354   noit_http_response_end(ctx); 
     356  mtev_http_response_xml(ctx, doc); 
     357  mtev_http_response_end(ctx); 
    355358  goto cleanup; 
    356359 
     
    361364 
    362365static int 
    363 check_test_init(noit_dso_generic_t *self) { 
    364   assert(noit_http_rest_register( 
     366check_test_init(mtev_dso_generic_t *self) { 
     367  assert(mtev_http_rest_register( 
    365368    "POST", "/checks/", "^test(\\.xml|\\.json)?$", 
    366369    rest_test_check 
     
    369372} 
    370373 
    371 noit_dso_generic_t check_test = { 
     374mtev_dso_generic_t check_test = { 
    372375  { 
    373     .magic = NOIT_GENERIC_MAGIC, 
    374     .version = NOIT_GENERIC_ABI_VERSION, 
     376    .magic = MTEV_GENERIC_MAGIC, 
     377    .version = MTEV_GENERIC_ABI_VERSION, 
    375378    .name = "check_test", 
    376379    .description = "Check Tester", 
  • src/modules/collectd.c

    ra2821f6 r304ec80  
    11/* 
    2  * Copyright (c) 2013, Circonus, Inc
     2 * Copyright (c) 2013-2015, Circonus, Inc. All rights reserved
    33 * Copyright (c) 2005-2009  Florian Forster 
    44 * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
     
    2323 */ 
    2424 
    25 #include "noit_defines.h" 
    26 #include "utils/noit_str.h" 
     25#include <mtev_defines.h> 
    2726 
    2827#include <stdio.h> 
     
    4039#include <netinet/in.h> 
    4140#include <arpa/inet.h> 
     41#include <yajl/yajl_parse.h> 
     42 
     43#include <mtev_str.h> 
     44#include <mtev_rest.h> 
     45#include <mtev_hash.h> 
     46#include <mtev_b64.h> 
    4247 
    4348#include "noit_module.h" 
    4449#include "noit_check.h" 
    4550#include "noit_check_tools.h" 
    46 #include "noit_rest.h" 
    47 #include "yajl-lib/yajl_parse.h" 
    48 #include "utils/noit_log.h" 
    49 #include "utils/noit_hash.h" 
    50 #include "utils/noit_b64.h" 
    51  
    52  
    53 static noit_log_stream_t nlerr = NULL; 
    54 static noit_log_stream_t nldeb = NULL; 
    55 static noit_log_stream_t nldebp = NULL; 
     51#include "noit_mtev_bridge.h" 
     52 
     53 
     54static mtev_log_stream_t nlerr = NULL; 
     55static mtev_log_stream_t nldeb = NULL; 
     56static mtev_log_stream_t nldebp = NULL; 
    5657static noit_module_t *global_collectd = NULL; 
    5758 
    5859typedef struct _mod_config { 
    59   noit_hash_table *options; 
    60   noit_hash_table target_sessions; 
    61   noit_boolean support_notifications; 
    62   noit_boolean asynch_metrics; 
     60  mtev_hash_table *options; 
     61  mtev_hash_table target_sessions; 
     62  mtev_boolean support_notifications; 
     63  mtev_boolean asynch_metrics; 
    6364  int ipv4_fd; 
    6465  int ipv6_fd; 
     
    404405#define ntohd(d) (d) 
    405406 
    406 static noit_boolean 
     407static mtev_boolean 
    407408noit_collects_check_aynsch(noit_module_t *self, 
    408409                           noit_check_t *check) { 
    409410  const char *config_val; 
    410411  collectd_mod_config_t *conf = noit_module_get_userdata(self); 
    411   noit_boolean is_asynch = conf->asynch_metrics; 
    412   if(noit_hash_retr_str(check->config, 
     412  mtev_boolean is_asynch = conf->asynch_metrics; 
     413  if(mtev_hash_retr_str(check->config, 
    413414                        "asynch_metrics", strlen("asynch_metrics"), 
    414415                        (const char **)&config_val)) { 
    415416    if(!strcasecmp(config_val, "false") || !strcasecmp(config_val, "off")) 
    416       is_asynch = noit_false; 
     417      is_asynch = mtev_false; 
    417418  } 
    418419 
     
    455456    if (success != 1) 
    456457    { 
    457       noitL(nlerr, "collectd: EVP_DecryptInit returned: %d\n", 
     458      mtevL(nlerr, "collectd: EVP_DecryptInit returned: %d\n", 
    458459          success); 
    459460      return (NULL); 
     
    482483  if (buffer_len < 15) 
    483484  { 
    484     noitL(nlerr,"collectd: packet is too short: " 
     485    mtevL(nlerr,"collectd: packet is too short: " 
    485486        "buffer_len = %zu\n", buffer_len); 
    486487    return (-1); 
     
    505506  if (buffer_len < exp_size) 
    506507  { 
    507     noitL(nlerr, "collectd: parse_part_values: " 
     508    mtevL(nlerr, "collectd: parse_part_values: " 
    508509        "Packet too short: " 
    509510        "Chunk of size %zu expected, " 
     
    515516  if (pkg_length != exp_size) 
    516517  { 
    517     noitL(nldeb, "collectd: parse_part_values: " 
     518    mtevL(nldeb, "collectd: parse_part_values: " 
    518519        "Length and number of values " 
    519520        "in the packet don't match.\n"); 
     
    527528    sfree (pkg_types); 
    528529    sfree (pkg_values); 
    529     noitL(nlerr, "collectd: parse_part_values: malloc failed.\n"); 
     530    mtevL(nlerr, "collectd: parse_part_values: malloc failed.\n"); 
    530531    return (-1); 
    531532  } 
     
    557558 
    558559      default: 
    559         noitL(nldeb, "collectd: parse_part_values: " 
     560        mtevL(nldeb, "collectd: parse_part_values: " 
    560561      "Don't know how to handle data source type %"PRIu8 "\n", 
    561562      pkg_types[i]); 
     
    590591  if ((size_t) buffer_len < exp_size) 
    591592  { 
    592     noitL(nlerr, "collectd: parse_part_number: " 
     593    mtevL(nlerr, "collectd: parse_part_number: " 
    593594        "Packet too short: " 
    594595        "Chunk of size %zu expected, " 
     
    628629  if (buffer_len < header_size) 
    629630  { 
    630     noitL(nlerr, "collectd: parse_part_string: " 
     631    mtevL(nlerr, "collectd: parse_part_string: " 
    631632        "Packet too short: " 
    632633        "Chunk of at least size %zu expected, " 
     
    646647  if (pkg_length > buffer_len) 
    647648  { 
    648     noitL(nlerr, "collectd: parse_part_string: " 
     649    mtevL(nlerr, "collectd: parse_part_string: " 
    649650        "Packet too big: " 
    650651        "Chunk of size %"PRIu16" received, " 
     
    657658  if (pkg_length <= header_size) 
    658659  { 
    659     noitL(nlerr, "collectd: parse_part_string: " 
     660    mtevL(nlerr, "collectd: parse_part_string: " 
    660661        "Packet too short: " 
    661662        "Header claims this packet is only %hu " 
     
    670671      || ((size_t) output_len < ((size_t) pkg_length - header_size))) 
    671672  { 
    672     noitL(nlerr, "collectd: parse_part_string: " 
     673    mtevL(nlerr, "collectd: parse_part_string: " 
    673674        "Output buffer too small.\n"); 
    674675    return (-1); 
     
    684685  if (output[output_len - 1] != 0) 
    685686  { 
    686     noitL(nlerr, "collectd: parse_part_string: " 
     687    mtevL(nlerr, "collectd: parse_part_string: " 
    687688        "Received string does not end " 
    688689        "with a NULL-byte.\n"); 
     
    734735  if (ccl->username == NULL) 
    735736  { 
    736     noitL(nldeb, "collectd: Received signed network packet but can't verify " 
     737    mtevL(nldeb, "collectd: Received signed network packet but can't verify " 
    737738        "it because no user has been configured. Will accept it.\n"); 
    738739    return (0); 
     
    741742  if (ccl->secret == NULL) 
    742743  { 
    743     noitL(nldeb, "collectd: Received signed network packet but can't verify " 
     744    mtevL(nldeb, "collectd: Received signed network packet but can't verify " 
    744745        "it because no secret has been configured. Will accept it.\n"); 
    745746    return (0); 
     
    759760      || (pss_head_length > buffer_len)) 
    760761  { 
    761     noitL(nlerr, "collectd: HMAC-SHA-256 with invalid length received.\n"); 
     762    mtevL(nlerr, "collectd: HMAC-SHA-256 with invalid length received.\n"); 
    762763    return (-1); 
    763764  } 
     
    781782  if (strcmp(ccl->username, pss.username) != 0) 
    782783  { 
    783     noitL(nlerr, "collectd: User: %s and Given User: %s don't match\n", ccl->username, pss.username); 
     784    mtevL(nlerr, "collectd: User: %s and Given User: %s don't match\n", ccl->username, pss.username); 
    784785    sfree (pss.username); 
    785786    return (-ENOENT); 
     
    793794  if (hash_ptr == NULL) 
    794795  { 
    795     noitL(nlerr, "collectd: Creating HMAC-SHA-256 object failed.\n"); 
     796    mtevL(nlerr, "collectd: Creating HMAC-SHA-256 object failed.\n"); 
    796797    sfree (pss.username); 
    797798    return (-1); 
     
    803804  if (memcmp (pss.hash, hash, sizeof (pss.hash)) != 0) 
    804805  { 
    805     noitL(nlerr, "collectd: Verifying HMAC-SHA-256 signature failed: " 
     806    mtevL(nlerr, "collectd: Verifying HMAC-SHA-256 signature failed: " 
    806807        "Hash mismatch.\n"); 
    807808  } 
     
    842843  if (buffer_len <= PART_ENCRYPTION_AES256_SIZE) 
    843844  { 
    844     noitL(nldeb, "collectd: parse_part_encr_aes256: " 
     845    mtevL(nldeb, "collectd: parse_part_encr_aes256: " 
    845846        "Discarding short packet.\n"); 
    846847    return (-1); 
     
    858859      || (part_size > buffer_len)) 
    859860  { 
    860     noitL(nldeb, "collectd: parse_part_encr_aes256: " 
     861    mtevL(nldeb, "collectd: parse_part_encr_aes256: " 
    861862        "Discarding part with invalid size.\n"); 
    862863    return (-1); 
     
    870871      || (username_len > (part_size - (PART_ENCRYPTION_AES256_SIZE + 1)))) 
    871872  { 
    872     noitL(nldeb, "collectd: parse_part_encr_aes256: " 
     873    mtevL(nldeb, "collectd: parse_part_encr_aes256: " 
    873874        "Discarding part with invalid username length.\n"); 
    874875    return (-1); 
     
    892893  if (strcmp(ccl->username, pea.username) != 0) 
    893894  { 
    894     noitL(nlerr, "collectd: Username received and server side username don't match\n"); 
     895    mtevL(nlerr, "collectd: Username received and server side username don't match\n"); 
    895896    sfree (pea.username); 
    896897    return (-ENOENT); 
     
    913914  if (err != 1) 
    914915  { 
    915     noitL(nlerr, "collectd: openssl returned: %d\n", err); 
     916    mtevL(nlerr, "collectd: openssl returned: %d\n", err); 
    916917    return (-1); 
    917918  } 
     
    936937  if (memcmp (hash, pea.hash, sizeof (hash)) != 0) 
    937938  { 
    938     noitL(nlerr, "collectd: Decryption failed: Checksum mismatch.\n"); 
     939    mtevL(nlerr, "collectd: Decryption failed: Checksum mismatch.\n"); 
    939940    return (-1); 
    940941  } 
     
    10021003      if (status != 0) 
    10031004      { 
    1004         noitL(nlerr, "collectd: Decrypting AES256 " 
     1005        mtevL(nlerr, "collectd: Decrypting AES256 " 
    10051006            "part failed " 
    10061007            "with status %i.\n", status); 
     
    10131014      if (printed_ignore_warning == 0) 
    10141015      { 
    1015         noitL(nldeb, "collectd: Unencrypted packet or " 
     1016        mtevL(nldeb, "collectd: Unencrypted packet or " 
    10161017            "part has been ignored.\n"); 
    10171018        printed_ignore_warning = 1; 
     
    10261027      if (status != 0) 
    10271028      { 
    1028         noitL(nlerr, "collectd: Verifying HMAC-SHA-256 " 
     1029        mtevL(nlerr, "collectd: Verifying HMAC-SHA-256 " 
    10291030            "signature failed " 
    10301031            "with status %i.\n", status); 
     
    10381039      if (printed_ignore_warning == 0) 
    10391040      { 
    1040         noitL(nldeb, "collectd: Unsigned packet or " 
     1041        mtevL(nldeb, "collectd: Unsigned packet or " 
    10411042            "part has been ignored.\n"); 
    10421043        printed_ignore_warning = 1; 
     
    10611062      else 
    10621063      { 
    1063         noitL(nlerr, 
     1064        mtevL(nlerr, 
    10641065              "collectd: NOT dispatching values [%lld,%s:%s:%s]\n", 
    10651066              (long long int)vl.time.tv_sec, vl.host, vl.plugin, vl.type); 
     
    11591160          && (n.severity != NOTIF_OKAY)) 
    11601161      { 
    1161         noitL(nlerr, "collectd: " 
     1162        mtevL(nlerr, "collectd: " 
    11621163            "Ignoring notification with " 
    11631164            "unknown severity %i.\n", 
     
    11671168      else if (n.time <= 0) 
    11681169      { 
    1169         noitL(nlerr, "collectd: " 
     1170        mtevL(nlerr, "collectd: " 
    11701171            "Ignoring notification with " 
    11711172            "time == 0.\n"); 
     
    11741175      else if (strlen (n.message) <= 0) 
    11751176      { 
    1176         noitL(nlerr, "collectd: " 
     1177        mtevL(nlerr, "collectd: " 
    11771178            "Ignoring notification with " 
    11781179            "an empty message.\n"); 
     
    11811182      { 
    11821183        queue_notifications(ccl, self, check, &n); 
    1183         noitL(nlerr, "collectd: " 
     1184        mtevL(nlerr, "collectd: " 
    11841185            "DISPATCH NOTIFICATION\n"); 
    11851186      } 
     
    11951196    else 
    11961197    { 
    1197       noitL(nlerr, "collectd: parse_packet: Unknown part" 
     1198      mtevL(nlerr, "collectd: parse_packet: Unknown part" 
    11981199          " type: 0x%04hx\n", pkg_type); 
    11991200      buffer = ((char *) buffer) + pkg_length; 
     
    12311232    snprintf(buf, sizeof(buf), "%d", index); 
    12321233    strcat(buffer, buf); 
    1233     noitL(nldeb, "collectd: parsing multiple values"  
     1234    mtevL(nldeb, "collectd: parsing multiple values"  
    12341235        " and guessing on the type for plugin[%s] and type[%s]" 
    12351236        , vl->plugin, vl->type); 
     
    12581259      noit_module_t *self, noit_check_t *check, notification_t *n) { 
    12591260  stats_t tmpstats; 
    1260   noit_boolean immediate; 
     1261  mtev_boolean immediate; 
    12611262  char buffer[OVERSIZED_DATA_MAX_NAME_LEN*4 + 128]; 
    12621263  collectd_mod_config_t *conf; 
     
    12771278    noit_stats_log_immediate_metric(check, buffer, METRIC_STRING, n->message); 
    12781279  noit_check_passive_set_stats(check, &tmpstats); 
    1279   noitL(nldeb, "collectd: dispatch_notifications(%s, %s, %s)\n",check->target, buffer, n->message); 
     1280  mtevL(nldeb, "collectd: dispatch_notifications(%s, %s, %s)\n",check->target, buffer, n->message); 
    12801281  return 0; 
    12811282} 
     
    12841285static int queue_values(collectd_closure_t *ccl, 
    12851286      noit_module_t *self, noit_check_t *check, value_list_t *vl) { 
    1286   noit_boolean immediate; 
     1287  mtev_boolean immediate; 
    12871288  char buffer[OVERSIZED_DATA_MAX_NAME_LEN*4 + 4 + 1 + 20]; 
    12881289  int i, len = 0; 
     
    13241325 
    13251326      default: 
    1326         noitL(nldeb, "collectd: parse_part_values: " 
     1327        mtevL(nldeb, "collectd: parse_part_values: " 
    13271328              "Don't know how to handle data source type %"PRIu8 "\n", 
    13281329              vl->types[i]); 
     
    13301331    } /* switch (value_types[i]) */ 
    13311332    ccl->stats_count++; 
    1332     noitL(nldeb, "collectd: queue_values(%s, %s)\n", buffer, check->target); 
     1333    mtevL(nldeb, "collectd: queue_values(%s, %s)\n", buffer, check->target); 
    13331334  } 
    13341335  return 0; 
     
    13371338static int 
    13381339collectd_submit_internal(noit_module_t *self, noit_check_t *check, 
    1339                          noit_check_t *cause, noit_boolean direct) { 
     1340                         noit_check_t *cause, mtev_boolean direct) { 
    13401341  collectd_closure_t *ccl; 
    13411342  struct timeval now, duration, age; 
    1342   noit_boolean immediate; 
     1343  mtev_boolean immediate; 
    13431344  /* We are passive, so we don't do anything for transient checks */ 
    13441345  if(check->flags & NP_TRANSIENT) return 0; 
     
    13701371             "dur=%d,run=%d,stats=%d,ntfy=%d", check->stats.inprogress.duration,  
    13711372             check->generation, ccl->stats_count, ccl->ntfy_count); 
    1372     noitL(nldeb, "collectd(%s) [%s]\n", check->target, human_buffer); 
     1373    mtevL(nldeb, "collectd(%s) [%s]\n", check->target, human_buffer); 
    13731374 
    13741375    // Not sure what to do here 
     
    13911392collectd_submit(noit_module_t *self, noit_check_t *check, 
    13921393                noit_check_t *cause) { 
    1393   return collectd_submit_internal(self, check, cause, noit_false); 
     1394  return collectd_submit_internal(self, check, cause, mtev_false); 
    13941395} 
    13951396 
     
    14211422  // Default to NONE 
    14221423  ccl->security_level = SECURITY_LEVEL_NONE; 
    1423   if (noit_hash_retr_str(check->config, "security_level", strlen("security_level"), 
     1424  if (mtev_hash_retr_str(check->config, "security_level", strlen("security_level"), 
    14241425                         (const char**)&security_buffer) || 
    1425       noit_hash_retr_str(conf->options, "security_level", strlen("security_level"), 
     1426      mtev_hash_retr_str(conf->options, "security_level", strlen("security_level"), 
    14261427                         (const char**)&security_buffer)) 
    14271428  { 
     
    14301431 
    14311432  // Is this outside to keep updates happening? 
    1432   if (!noit_hash_retr_str(check->config, "username", strlen("username"), 
     1433  if (!mtev_hash_retr_str(check->config, "username", strlen("username"), 
    14331434                         (const char**)&ccl->username) && 
    1434       !noit_hash_retr_str(conf->options, "username", strlen("username"), 
     1435      !mtev_hash_retr_str(conf->options, "username", strlen("username"), 
    14351436                         (const char**)&ccl->username))  
    14361437  { 
    14371438    if (ccl->security_level == SECURITY_LEVEL_ENCRYPT) { 
    1438       noitL(nlerr, "collectd: no username defined for check.\n"); 
     1439      mtevL(nlerr, "collectd: no username defined for check.\n"); 
    14391440      return 0; 
    14401441    } else if (ccl->security_level == SECURITY_LEVEL_SIGN) { 
    1441       noitL(nlerr, "collectd: no username defined for check, " 
     1442      mtevL(nlerr, "collectd: no username defined for check, " 
    14421443          "will accept any signed packet.\n"); 
    14431444    } 
     
    14451446 
    14461447  if(!ccl->secret) 
    1447     (void)noit_hash_retr_str(check->config, "secret", strlen("secret"), 
     1448    (void)mtev_hash_retr_str(check->config, "secret", strlen("secret"), 
    14481449                       (const char**)&ccl->secret); 
    14491450  if(!ccl->secret) 
    1450     (void)noit_hash_retr_str(conf->options, "secret", strlen("secret"), 
     1451    (void)mtev_hash_retr_str(conf->options, "secret", strlen("secret"), 
    14511452                       (const char**)&ccl->secret); 
    14521453  if(!ccl->secret) { 
    14531454    if (ccl->security_level == SECURITY_LEVEL_ENCRYPT) { 
    1454       noitL(nlerr, "collectd: no secret defined for check.\n"); 
     1455      mtevL(nlerr, "collectd: no secret defined for check.\n"); 
    14551456      return 0; 
    14561457    } 
    14571458    else if (ccl->security_level == SECURITY_LEVEL_SIGN) { 
    1458       noitL(nlerr, "collectd: no secret defined for check, " 
     1459      mtevL(nlerr, "collectd: no secret defined for check, " 
    14591460          "will accept any signed packet.\n"); 
    14601461    } 
     
    14911492    if(inlen < 0) { 
    14921493      if(errno == EAGAIN || errno == EINTR) break; 
    1493       noitLT(nlerr, now, "collectd: recvfrom: %s\n", strerror(errno)); 
     1494      mtevLT(nlerr, now, "collectd: recvfrom: %s\n", strerror(errno)); 
    14941495      break; 
    14951496    } 
    14961497    if (from_len == sizeof(remote.skaddr)) { 
    14971498      if (!inet_ntop(AF_INET, &(remote.skaddr.sin_addr), ip_p, INET_ADDRSTRLEN)) { 
    1498         noitLT(nlerr, now, "collectd: inet_ntop failed: %s\n", strerror(errno)); 
     1499        mtevLT(nlerr, now, "collectd: inet_ntop failed: %s\n", strerror(errno)); 
    14991500        break; 
    15001501      } 
     
    15021503    else if(from_len == sizeof(remote.skaddr6)) { 
    15031504      if (!inet_ntop(AF_INET6, &(remote.skaddr6.sin6_addr), ip_p, INET6_ADDRSTRLEN)) { 
    1504         noitLT(nlerr, now, "collectd: inet_ntop failed: %s\n", strerror(errno)); 
     1505        mtevLT(nlerr, now, "collectd: inet_ntop failed: %s\n", strerror(errno)); 
    15051506        break; 
    15061507      } 
    15071508    } 
    15081509    else { 
    1509       noitLT(nlerr, now, "collectd: could not determine address family of remote\n"); 
     1510      mtevLT(nlerr, now, "collectd: could not determine address family of remote\n"); 
    15101511      break; 
    15111512    } 
     
    15161517    check_cnt = noit_poller_target_ip_do(ip_p, push_packet_at_check ,&pkt); 
    15171518    if(check_cnt == 0) 
    1518       noitL(nlerr, "collectd: No defined check from ip [%s].\n", ip_p); 
     1519      mtevL(nlerr, "collectd: No defined check from ip [%s].\n", ip_p); 
    15191520  } 
    15201521  return EVENTER_READ | EVENTER_EXCEPTION; 
     
    15321533} 
    15331534 
    1534 static int noit_collectd_config(noit_module_t *self, noit_hash_table *options) { 
     1535static int noit_collectd_config(noit_module_t *self, mtev_hash_table *options) { 
    15351536  const char *istr; 
    15361537  int len; 
     
    15391540  if(conf) { 
    15401541    if(conf->options) { 
    1541       noit_hash_destroy(conf->options, free, free); 
     1542      mtev_hash_destroy(conf->options, free, free); 
    15421543      free(conf->options); 
    15431544    } 
     
    15491550  /* Set out sizes up optionally */ 
    15501551#define SET_ATTR_LEN(attr, TGT_LEN) do { \ 
    1551   if(noit_hash_retr_str(conf->options, attr, strlen(attr), &istr)) { \ 
     1552  if(mtev_hash_retr_str(conf->options, attr, strlen(attr), &istr)) { \ 
    15521553    len = atoi(istr); \ 
    15531554    if(len < 64) len = 64; \ 
     
    15661567} 
    15671568 
    1568 static int noit_collectd_onload(noit_image_t *self) { 
    1569   if(!nlerr) nlerr = noit_log_stream_find("error/collectd"); 
    1570   if(!nldeb) nldeb = noit_log_stream_find("debug/collectd"); 
    1571   if(!nldebp) nldebp = noit_log_stream_find("debug/collectd_yajl"); 
     1569static int noit_collectd_onload(mtev_image_t *self) { 
     1570  if(!nlerr) nlerr = mtev_log_stream_find("error/collectd"); 
     1571  if(!nldeb) nldeb = mtev_log_stream_find("debug/collectd"); 
     1572  if(!nldebp) nldebp = mtev_log_stream_find("debug/collectd_yajl"); 
    15721573  if(!nlerr) nlerr = noit_error; 
    15731574  if(!nldeb) nldeb = noit_debug; 
     
    16541655  struct rest_json_payload *json = rxc; 
    16551656  collectd_closure_t *ccl; 
    1656   noit_boolean immediate, needs_immediate = noit_false; 
     1657  mtev_boolean immediate, needs_immediate = mtev_false; 
    16571658  collectd_mod_config_t *conf = noit_module_get_userdata(global_collectd); 
    16581659 
    16591660  if(strcmp(check->module, "collectd")) return 0; 
    1660   if(!(noit_hash_retr_str(check->config, "secret", 6, &pass) || 
    1661        noit_hash_retr_str(conf->options, "secret", 6, &pass)) || 
    1662      !(noit_hash_retr_str(check->config, "username", 8, &user) || 
    1663        noit_hash_retr_str(conf->options, "username", 8, &user))) { 
     1661  if(!(mtev_hash_retr_str(check->config, "secret", 6, &pass) || 
     1662       mtev_hash_retr_str(conf->options, "secret", 6, &pass)) || 
     1663     !(mtev_hash_retr_str(check->config, "username", 8, &user) || 
     1664       mtev_hash_retr_str(conf->options, "username", 8, &user))) { 
    16641665    json->access_failures += json->o->nnames; 
    16651666    return 0; 
     
    16841685  for(i=0; i<json->o->nnames; i++) { 
    16851686    metric_t *m = &json->o->metrics[i]; 
    1686     noitL(nldeb, "collectd(%s) -> %s\n", check->name, m->metric_name); 
     1687    mtevL(nldeb, "collectd(%s) -> %s\n", check->name, m->metric_name); 
    16871688    noit_stats_set_metric(check, &check->stats.inprogress, m->metric_name, 
    16881689                          m->metric_type, m->metric_value.vp); 
    16891690    if(immediate) { 
    1690       needs_immediate = noit_true; 
     1691      needs_immediate = mtev_true; 
    16911692      noit_stats_log_immediate_metric(check, m->metric_name, 
    16921693                                      m->metric_type, m->metric_value.vp); 
     
    17751776collectd_yajl_cb_null(void *ctx) { 
    17761777  struct rest_json_payload *json = ctx; 
    1777   noitL(nldebp, "-> null\n"); 
     1778  mtevL(nldebp, "-> null\n"); 
    17781779  switch(json->state) { 
    17791780    case CD_OBJECT: 
     
    17881789    default: break; 
    17891790  } 
    1790   noitL(nldebp, "yajl null in state %s\n", cd_state_name(json->state)); 
     1791  mtevL(nldebp, "yajl null in state %s\n", cd_state_name(json->state)); 
    17911792  return 0; 
    17921793} 
     
    17941795collectd_yajl_cb_boolean(void *ctx, int boolVal) { 
    17951796  struct rest_json_payload *json = ctx; 
    1796   noitL(nldebp, "-> boolean(%s)\n", boolVal ? "true" : "false"); 
     1797  mtevL(nldebp, "-> boolean(%s)\n", boolVal ? "true" : "false"); 
    17971798  switch(json->state) { 
    17981799    case CD_OBJECT: 
     
    18011802    default: break; 
    18021803  } 
    1803   noitL(nldebp, "yajl boolean in state %s\n", cd_state_name(json->state)); 
     1804  mtevL(nldebp, "yajl boolean in state %s\n", cd_state_name(json->state)); 
    18041805  return 0; 
    18051806} 
     
    18121813  memcpy(numberVal, numberValu, numberLen); 
    18131814  numberVal[numberLen] = '\0'; 
    1814   noitL(nldebp, "-> number(%s)\n", numberVal); 
     1815  mtevL(nldebp, "-> number(%s)\n", numberVal); 
    18151816  switch(json->state) { 
    18161817    case CD_OBJECT: 
     
    18401841    default: break; 
    18411842  } 
    1842   noitL(nldebp, "yajl number in state %s\n", cd_state_name(json->state)); 
     1843  mtevL(nldebp, "yajl number in state %s\n", cd_state_name(json->state)); 
    18431844  return 0; 
    18441845} 
     
    18481849  char *stringVal = (char *)stringValu; 
    18491850  struct rest_json_payload *json = ctx; 
    1850   noitL(nldebp, "-> string(%.*s)\n", (int)stringLen, stringVal); 
     1851  mtevL(nldebp, "-> string(%.*s)\n", (int)stringLen, stringVal); 
    18511852  switch(json->state) { 
    18521853    case CD_OBJECT: 
     
    18641865        free(json->o->metrics[json->metric_idx].metric_name); 
    18651866      json->o->metrics[json->metric_idx].metric_name = 
    1866         noit__strndup(stringVal, stringLen); 
     1867        mtev__strndup(stringVal, stringLen); 
    18671868      json->metric_idx++; 
    18681869      json->o->nnames = MAX(json->o->nnames, json->metric_idx); 
     
    18801881    default: break; 
    18811882  } 
    1882   noitL(nldebp, "yajl string in state %s\n", cd_state_name(json->state)); 
     1883  mtevL(nldebp, "yajl string in state %s\n", cd_state_name(json->state)); 
    18831884  return 0; 
    18841885} 
     
    18861887collectd_yajl_cb_start_map(void *ctx) { 
    18871888  struct rest_json_payload *json = ctx; 
    1888   noitL(nldebp, "-> start_map\n"); 
     1889  mtevL(nldebp, "-> start_map\n"); 
    18891890  switch(json->state) { 
    18901891    case CD_LIST: 
     
    19021903    default: break; 
    19031904  } 
    1904   noitL(nldebp, "yajl start_map in state %s\n", cd_state_name(json->state)); 
     1905  mtevL(nldebp, "yajl start_map in state %s\n", cd_state_name(json->state)); 
    19051906  return 0; 
    19061907} 
     
    19081909collectd_yajl_cb_end_map(void *ctx) { 
    19091910  struct rest_json_payload *json = ctx; 
    1910   noitL(nldebp, "-> end_map\n"); 
     1911  mtevL(nldebp, "-> end_map\n"); 
    19111912  switch(json->state) { 
    19121913    case CD_OBJECT: 
     
    19281929    default: break; 
    19291930  } 
    1930   noitL(nldebp, "yajl end_map in state %s\n", cd_state_name(json->state)); 
     1931  mtevL(nldebp, "yajl end_map in state %s\n", cd_state_name(json->state)); 
    19311932  return 0; 
    19321933} 
     
    19341935collectd_yajl_cb_start_array(void *ctx) { 
    19351936  struct rest_json_payload *json = ctx; 
    1936   noitL(nldebp, "-> start_array\n"); 
     1937  mtevL(nldebp, "-> start_array\n"); 
    19371938  switch(json->state) { 
    19381939    case CD_NONE: 
     
    19521953    default: break; 
    19531954  } 
    1954   noitL(nldebp, "yajl start_array in state %s\n", cd_state_name(json->state)); 
     1955  mtevL(nldebp, "yajl start_array in state %s\n", cd_state_name(json->state)); 
    19551956  return 0; 
    19561957} 
     
    19581959collectd_yajl_cb_end_array(void *ctx) { 
    19591960  struct rest_json_payload *json = ctx; 
    1960   noitL(nldebp, "-> end_array\n"); 
     1961  mtevL(nldebp, "-> end_array\n"); 
    19611962  switch(json->state) { 
    19621963    case CD_LIST: json->state = CD_NONE; return 1; 
     
    19741975    default: break; 
    19751976  } 
    1976   noitL(nldebp, "yajl end_array in state %s\n", cd_state_name(json->state)); 
     1977  mtevL(nldebp, "yajl end_array in state %s\n", cd_state_name(json->state)); 
    19771978  return 0; 
    19781979} 
     
    19821983  char *key = (char *)keyu; 
    19831984  struct rest_json_payload *json = ctx; 
    1984   noitL(nldebp, "-> map_key(%.*s)\n", (int)keyLen, key); 
     1985  mtevL(nldebp, "-> map_key(%.*s)\n", (int)keyLen, key); 
    19851986  if(json->state == CD_DONTCARE) return 1; 
    19861987  if(json->state == CD_OBJECT) { 
     
    19981999    return 1; 
    19992000  } 
    2000   noitL(nldebp, "yajl map_key in state %s\n", cd_state_name(json->state)); 
     2001  mtevL(nldebp, "yajl map_key in state %s\n", cd_state_name(json->state)); 
    20012002  return 0; 
    20022003} 
     
    20142015 
    20152016static struct rest_json_payload * 
    2016 rest_get_json_upload(noit_http_rest_closure_t *restc, 
     2017rest_get_json_upload(mtev_http_rest_closure_t *restc, 
    20172018                    int *mask, int *complete) { 
    20182019  struct rest_json_payload *rxc; 
    2019   noit_http_request *req = noit_http_session_request(restc->http_ctx); 
     2020  mtev_http_request *req = mtev_http_session_request(restc->http_ctx); 
    20202021  int content_length; 
    20212022  char buffer[32768]; 
    20222023 
    2023   content_length = noit_http_request_content_length(req); 
     2024  content_length = mtev_http_request_content_length(req); 
    20242025  rxc = restc->call_closure; 
    20252026  while(!rxc->complete) { 
    20262027    int len; 
    2027     len = noit_http_session_req_consume( 
     2028    len = mtev_http_session_req_consume( 
    20282029            restc->http_ctx, buffer, 
    20292030            MIN(content_length - rxc->len, sizeof(buffer)), 
     
    20482049      return NULL; 
    20492050    } 
    2050     content_length = noit_http_request_content_length(req); 
    2051     if((noit_http_request_payload_chunked(req) && len == 0) || 
     2051    content_length = mtev_http_request_content_length(req); 
     2052    if((mtev_http_request_payload_chunked(req) && len == 0) || 
    20522053       (rxc->len == content_length)) { 
    20532054      rxc->complete = 1; 
     
    20612062 
    20622063static int 
    2063 rest_collectd_handler(noit_http_rest_closure_t *restc, 
     2064rest_collectd_handler(mtev_http_rest_closure_t *restc, 
    20642065                      int npats, char **pats) { 
    20652066  int mask, complete = 0, len; 
     
    20672068  struct rest_json_payload *rxc = NULL; 
    20682069  const char *error = "internal error"; 
    2069   noit_http_session_ctx *ctx = restc->http_ctx; 
    2070   noit_http_request *req; 
    2071   noit_hash_table *hdrs; 
     2070  mtev_http_session_ctx *ctx = restc->http_ctx; 
     2071  mtev_http_request *req; 
     2072  mtev_hash_table *hdrs; 
    20722073  const char *v; 
    20732074 
     
    20832084    restc->call_closure_free = rest_json_payload_free; 
    20842085 
    2085     req = noit_http_session_request(ctx); 
    2086     hdrs = noit_http_request_headers_table(req); 
    2087     if(!noit_hash_retr_str(hdrs, "authorization", 13, &v)) goto unauth; 
     2086    req = mtev_http_session_request(ctx); 
     2087    hdrs = mtev_http_request_headers_table(req); 
     2088    if(!mtev_hash_retr_str(hdrs, "authorization", 13, &v)) goto unauth; 
    20882089   
    20892090    if(strncmp(v, "Basic ", 6)) goto unauth; 
    20902091    rxc->user = strdup(v); 
    2091     len = noit_b64_decode(v+6, strlen(v)-6, 
     2092    len = mtev_b64_decode(v+6, strlen(v)-6, 
    20922093                          (unsigned char *)rxc->user, strlen(v)); 
    20932094    if(len < 0) goto unauth; 
     
    21062107    struct check_list *p; 
    21072108    for(p=rxc->immediate_checks;p;p=p->next) { 
    2108       collectd_submit_internal(global_collectd, p->check, NULL, noit_true); 
     2109      collectd_submit_internal(global_collectd, p->check, NULL, mtev_true); 
    21092110    } 
    21102111  } 
    21112112  if(rxc->error) goto error; 
    21122113 
    2113   noit_http_response_ok(ctx, "application/json"); 
     2114  mtev_http_response_ok(ctx, "application/json"); 
    21142115  snprintf(json_out, sizeof(json_out), 
    21152116           "{ \"metrics\": %d, \"checks\": %d, \"misses\": %d, \"access_failures\": %d }", 
    21162117           rxc->hits, rxc->nchecks, rxc->misses, rxc->access_failures); 
    2117   noit_http_response_append(ctx, json_out, strlen(json_out)); 
    2118   noit_http_response_end(ctx); 
     2118  mtev_http_response_append(ctx, json_out, strlen(json_out)); 
     2119  mtev_http_response_end(ctx); 
    21192120  return 0; 
    21202121 
    21212122 unauth: 
    2122         noit_http_response_header_set(ctx, "WWW-Authenticate", "Basic realm=\"collectd\""); 
    2123   noit_http_response_standard(ctx, 401, "AUTH", "text/plain"); 
    2124   noit_http_response_append(ctx, "Must Auth\r\n", strlen("Must Auth\r\n")); 
    2125   noit_http_response_end(ctx); 
     2123        mtev_http_response_header_set(ctx, "WWW-Authenticate", "Basic realm=\"collectd\""); 
     2124  mtev_http_response_standard(ctx, 401, "AUTH", "text/plain"); 
     2125  mtev_http_response_append(ctx, "Must Auth\r\n", strlen("Must Auth\r\n")); 
     2126  mtev_http_response_end(ctx); 
    21262127  return 0; 
    21272128 
    21282129 denied: 
    2129   noit_http_response_denied(ctx, "text/plain"); 
    2130   noit_http_response_end(ctx); 
     2130  mtev_http_response_denied(ctx, "text/plain"); 
     2131  mtev_http_response_end(ctx); 
    21312132  return 0; 
    21322133 
    21332134 error: 
    2134   noit_http_response_server_error(ctx, "application/json"); 
    2135   noit_http_response_append(ctx, "{ error: \"", 10); 
     2135  mtev_http_response_server_error(ctx, "application/json"); 
     2136  mtev_http_response_append(ctx, "{ error: \"", 10); 
    21362137  if(rxc && rxc->error) error = rxc->error; 
    2137   noit_http_response_append(ctx, error, strlen(error)); 
    2138   noit_http_response_append(ctx, "\" }", 3); 
    2139   noit_http_response_end(ctx); 
     2138  mtev_http_response_append(ctx, error, strlen(error)); 
     2139  mtev_http_response_append(ctx, "\" }", 3); 
     2140  mtev_http_response_end(ctx); 
    21402141  return 0; 
    21412142} 
     
    21552156  if(global_collectd) return -1; 
    21562157  memset(&in6addr_any, 0, sizeof(in6addr_any)); 
    2157   conf->support_notifications = noit_true; 
    2158   if(noit_hash_retr_str(conf->options, 
     2158  conf->support_notifications = mtev_true; 
     2159  if(mtev_hash_retr_str(conf->options, 
    21592160                        "notifications", strlen("notifications"), 
    21602161                        (const char **)&config_val)) { 
    21612162    if(!strcasecmp(config_val, "false") || !strcasecmp(config_val, "off")) 
    2162       conf->support_notifications = noit_false; 
    2163   } 
    2164   conf->asynch_metrics = noit_true; 
    2165   if(noit_hash_retr_str(conf->options, 
     2163      conf->support_notifications = mtev_false; 
     2164  } 
     2165  conf->asynch_metrics = mtev_true; 
     2166  if(mtev_hash_retr_str(conf->options, 
    21662167                        "asynch_metrics", strlen("asynch_metrics"), 
    21672168                        (const char **)&config_val)) { 
    21682169    if(!strcasecmp(config_val, "false") || !strcasecmp(config_val, "off")) 
    2169       conf->asynch_metrics = noit_false; 
     2170      conf->asynch_metrics = mtev_false; 
    21702171  } 
    21712172 
    21722173  /* Default Collectd port */ 
    21732174  portint = NET_DEFAULT_PORT; 
    2174   if(noit_hash_retr_str(conf->options, 
     2175  if(mtev_hash_retr_str(conf->options, 
    21752176                         "collectd_port", strlen("collectd_port"), 
    21762177                         (const char**)&config_val)) 
     
    21782179 
    21792180 
    2180   if(!noit_hash_retr_str(conf->options, 
     2181  if(!mtev_hash_retr_str(conf->options, 
    21812182                         "collectd_host", strlen("collectd_host"), 
    21822183                         (const char**)&host)) 
     
    21892190  conf->ipv4_fd = socket(PF_INET, NE_SOCK_CLOEXEC|SOCK_DGRAM, IPPROTO_UDP); 
    21902191  if(conf->ipv4_fd < 0) { 
    2191     noitL(nlerr, "collectd: socket failed: %s\n", 
     2192    mtevL(nlerr, "collectd: socket failed: %s\n", 
    21922193          strerror(errno)); 
    21932194  } 
     
    21962197      close(conf->ipv4_fd); 
    21972198      conf->ipv4_fd = -1; 
    2198       noitL(nlerr, 
     2199      mtevL(nlerr, 
    21992200            "collectd: could not set socket non-blocking: %s\n", 
    22002201            strerror(errno)); 
     
    22092210  if(conf->ipv4_fd >= 0) { 
    22102211    if(bind(conf->ipv4_fd, (struct sockaddr *)&skaddr, sockaddr_len) < 0) { 
    2211       noitL(nlerr, "collectd: bind failed[%s]: %s\n", host, strerror(errno)); 
     2212      mtevL(nlerr, "collectd: bind failed[%s]: %s\n", host, strerror(errno)); 
    22122213      close(conf->ipv4_fd); 
    22132214      conf->ipv4_fd = -1; 
     
    22272228  conf->ipv6_fd = socket(AF_INET6, NE_SOCK_CLOEXEC|SOCK_DGRAM, IPPROTO_UDP); 
    22282229  if(conf->ipv6_fd < 0) { 
    2229     noitL(nlerr, "collectd: IPv6 socket failed: %s\n", 
     2230    mtevL(nlerr, "collectd: IPv6 socket failed: %s\n", 
    22302231          strerror(errno)); 
    22312232  } 
     
    22342235      close(conf->ipv6_fd); 
    22352236      conf->ipv6_fd = -1; 
    2236       noitL(nlerr, 
     2237      mtevL(nlerr, 
    22372238            "collectd: could not set socket non-blocking: %s\n", 
    22382239               strerror(errno)); 
     
    22472248  if(conf->ipv6_fd >= 0 && 
    22482249     bind(conf->ipv6_fd, (struct sockaddr *)&skaddr6, sockaddr_len) < 0) { 
    2249     noitL(nlerr, "collectd: bind(IPv6) failed[%s]: %s\n", host, strerror(errno)); 
     2250    mtevL(nlerr, "collectd: bind(IPv6) failed[%s]: %s\n", host, strerror(errno)); 
    22502251    close(conf->ipv6_fd); 
    22512252    conf->ipv6_fd = -1; 
     
    22652266 
    22662267  /* register rest handler */ 
    2267   noit_http_rest_register("POST", "/module/", 
     2268  mtev_http_rest_register("POST", "/module/", 
    22682269                          "^collectd/?(.*)$", 
    22692270                          rest_collectd_handler); 
  • src/modules/custom_config.c

    r1174acf r304ec80  
    11/* 
    2  * Copyright (c) 2014, Circonus, Inc. 
    3  * All rights reserved. 
     2 * Copyright (c) 2014-2015, Circonus, Inc. All rights reserved. 
    43 * 
    54 * Redistribution and use in source and binary forms, with or without 
     
    3130 */ 
    3231 
    33 #include "noit_defines.h" 
     32#include <mtev_defines.h> 
     33 
     34#include <assert.h> 
     35 
     36#include <mtev_hash.h> 
     37 
    3438#include "noit_module.h" 
    3539#include "noit_check.h" 
    3640#include "noit_check_tools.h" 
    37 #include "utils/noit_log.h" 
    38 #include "utils/noit_hash.h" 
    39 #include "utils/noit_btrie.h" 
     41#include "noit_mtev_bridge.h" 
     42 
    4043#include "custom_config.xmlh" 
    41 #include <assert.h> 
    4244 
    4345static int custom_config_module_id = -1; 
    4446 
    4547static int 
    46 custom_config_onload(noit_image_t *self) { 
     48custom_config_onload(mtev_image_t *self) { 
    4749  int i, cnt; 
    48   noit_conf_section_t *acl_c; 
     50  mtev_conf_section_t *acl_c; 
    4951  custom_config_module_id = noit_check_register_module("custom"); 
    5052  if(custom_config_module_id < 0) return -1; 
     
    5355 
    5456static int 
    55 custom_config_config(noit_dso_generic_t *self, noit_hash_table *o) { 
     57custom_config_config(mtev_dso_generic_t *self, mtev_hash_table *o) { 
    5658  return 0; 
    5759} 
    5860 
    59 static noit_hook_return_t 
     61static mtev_hook_return_t 
    6062custom_config_hook_impl(void *closure, noit_check_t *check) { 
    61   noit_hash_table *config; 
     63  mtev_hash_table *config; 
    6264  config = noit_check_get_module_config(check, custom_config_module_id); 
    63   if(config && noit_hash_size(config)) { 
    64     noit_hash_merge_as_dict(check->config, config); 
     65  if(config && mtev_hash_size(config)) { 
     66    mtev_hash_merge_as_dict(check->config, config); 
    6567  } 
    66   return NOIT_HOOK_CONTINUE; 
     68  return MTEV_HOOK_CONTINUE; 
    6769} 
    6870 
    6971static int 
    70 custom_config_init(noit_dso_generic_t *self) { 
     72custom_config_init(mtev_dso_generic_t *self) { 
    7173  check_config_fixup_hook_register("custom_config", custom_config_hook_impl, NULL); 
    7274  return 0; 
    7375} 
    7476 
    75 noit_dso_generic_t custom_config = { 
     77mtev_dso_generic_t custom_config = { 
    7678  { 
    77     .magic = NOIT_GENERIC_MAGIC, 
    78     .version = NOIT_GENERIC_ABI_VERSION, 
     79    .magic = MTEV_GENERIC_MAGIC, 
     80    .version = MTEV_GENERIC_ABI_VERSION, 
    7981    .name = "custom_config", 
    8082    .description = "config namespaces", 
  • src/modules/dns.c

    rc2765ed r304ec80  
    22 * Copyright (c) 2007, OmniTI Computer Consulting, Inc. 
    33 * All rights reserved. 
     4 * Copyright (c) 2015, Circonus, Inc. All rights reserved. 
    45 * 
    56 * Redistribution and use in source and binary forms, with or without 
     
    3132 */ 
    3233 
    33 #include "noit_defines.h" 
     34#include <mtev_defines.h> 
    3435 
    3536#include <stdio.h> 
     
    4142#include <arpa/inet.h> 
    4243 
     44#include <mtev_log.h> 
     45#include <mtev_atomic.h> 
     46 
     47#include "noit_mtev_bridge.h" 
    4348#include "noit_module.h" 
    4449#include "noit_check.h" 
    4550#include "noit_check_tools.h" 
    46 #include "utils/noit_log.h" 
    47 #include "utils/noit_atomic.h" 
    4851#include "udns/udns.h" 
    4952 
     
    5255 
    5356typedef struct _mod_config { 
    54   noit_hash_table *options; 
     57  mtev_hash_table *options; 
    5558  int contexts; 
    5659} dns_mod_config_t; 
     
    6063static void register_console_dns_commands(); 
    6164 
    62 static noit_log_stream_t nlerr = NULL; 
    63 static noit_log_stream_t nldeb = NULL; 
    64  
    65 static noit_hash_table dns_rtypes = NOIT_HASH_EMPTY; 
    66 static noit_hash_table dns_ctypes = NOIT_HASH_EMPTY; 
    67  
    68 static noit_hash_table dns_ctx_store = NOIT_HASH_EMPTY; 
     65static mtev_log_stream_t nlerr = NULL; 
     66static mtev_log_stream_t nldeb = NULL; 
     67 
     68static mtev_hash_table dns_rtypes = MTEV_HASH_EMPTY; 
     69static mtev_hash_table dns_ctypes = MTEV_HASH_EMPTY; 
     70 
     71static mtev_hash_table dns_ctx_store = MTEV_HASH_EMPTY; 
    6972static pthread_mutex_t dns_ctx_store_lock; 
    7073typedef struct dns_ctx_handle { 
     
    7275  char *hkey; /* hash key - ns plus the port number */ 
    7376  struct dns_ctx *ctx;   
    74   noit_atomic32_t refcnt; 
     77  mtev_atomic32_t refcnt; 
    7578  eventer_t e; /* evetner handling UDP traffic */ 
    7679  eventer_t timeout; /* the timeout managed by libudns */ 
     
    9295} 
    9396static void dns_module_dns_ctx_acquire(dns_ctx_handle_t *h) { 
    94   noit_atomic_inc32(&h->refcnt); 
     97  mtev_atomic_inc32(&h->refcnt); 
    9598} 
    9699static void 
     
    98101               dnscc_t *pkt, int plen, 
    99102               const struct dns_query *q, void *data) { 
    100   noitL(nldeb, "dns code -> %d\n", code); 
     103  mtevL(nldeb, "dns code -> %d\n", code); 
    101104} 
    102105static dns_ctx_handle_t *dns_module_dns_ctx_alloc(noit_module_t *self, const char *ns, int port) { 
     
    122125 
    123126  if(ns && 
    124      noit_hash_retrieve(&dns_ctx_store, hk, strlen(hk), &vh)) { 
     127     mtev_hash_retrieve(&dns_ctx_store, hk, strlen(hk), &vh)) { 
    125128    h = (dns_ctx_handle_t *)vh; 
    126129    dns_module_dns_ctx_acquire(h); 
     
    133136    h->ctx = dns_new(NULL); 
    134137    if(dns_init(h->ctx, 0) != 0) { 
    135       noitL(nlerr, "dns_init failed\n"); 
     138      mtevL(nlerr, "dns_init failed\n"); 
    136139      failed++; 
    137140    } 
     
    139142    if(ns) { 
    140143      if(dns_add_serv(h->ctx, NULL) < 0) { 
    141         noitL(nlerr, "dns_add_serv(NULL) failed\n"); 
     144        mtevL(nlerr, "dns_add_serv(NULL) failed\n"); 
    142145        failed++; 
    143146      } 
    144147      if(dns_add_serv(h->ctx, ns) < 0) { 
    145         noitL(nlerr, "dns_add_serv(%s) failed\n", ns); 
     148        mtevL(nlerr, "dns_add_serv(%s) failed\n", ns); 
    146149        failed++; 
    147150      } 
     
    151154    } 
    152155    if(dns_open(h->ctx) < 0) { 
    153       noitL(nlerr, "dns_open failed\n"); 
     156      mtevL(nlerr, "dns_open failed\n"); 
    154157      failed++; 
    155158    } 
     
    174177      default_ctx_handle = h; 
    175178    else 
    176       noit_hash_store(&dns_ctx_store, h->hkey, strlen(h->hkey), h); 
     179      mtev_hash_store(&dns_ctx_store, h->hkey, strlen(h->hkey), h); 
    177180  } 
    178181 bail: 
     
    184187  if(h->ns == NULL) { 
    185188    /* Special case for the default */ 
    186     noit_atomic_dec32(&h->refcnt); 
     189    mtev_atomic_dec32(&h->refcnt); 
    187190    return rv; 
    188191  } 
    189192  pthread_mutex_lock(&dns_ctx_store_lock); 
    190   last = noit_atomic_dec32(&h->refcnt); 
     193  last = mtev_atomic_dec32(&h->refcnt); 
    191194  if(last == 0) { 
    192195    /* I was the last one */ 
    193     assert(noit_hash_delete(&dns_ctx_store, h->hkey, strlen(h->hkey), 
     196    assert(mtev_hash_delete(&dns_ctx_store, h->hkey, strlen(h->hkey), 
    194197                            NULL, dns_module_dns_ctx_handle_free)); 
    195198    rv = 1; 
     
    199202} 
    200203 
    201 static noit_hash_table active_events = NOIT_HASH_EMPTY; 
     204static mtev_hash_table active_events = MTEV_HASH_EMPTY; 
    202205static pthread_mutex_t active_events_lock; 
    203206 
     
    222225  int exists = 0; 
    223226  pthread_mutex_lock(&active_events_lock); 
    224   if(noit_hash_retrieve(&active_events, (void *)&ci, sizeof(ci), &u)) 
     227  if(mtev_hash_retrieve(&active_events, (void *)&ci, sizeof(ci), &u)) 
    225228    exists = 1; 
    226229  pthread_mutex_unlock(&active_events_lock); 
     
    232235  *holder = ci; 
    233236  pthread_mutex_lock(&active_events_lock); 
    234   assert(noit_hash_store(&active_events, (void *)holder, sizeof(*holder), ci)); 
     237  assert(mtev_hash_store(&active_events, (void *)holder, sizeof(*holder), ci)); 
    235238  pthread_mutex_unlock(&active_events_lock); 
    236239} 
    237240static void __deactivate_ci(struct dns_check_info *ci) { 
    238241  pthread_mutex_lock(&active_events_lock); 
    239   assert(noit_hash_delete(&active_events, (void *)&ci, sizeof(ci), free, NULL)); 
     242  assert(mtev_hash_delete(&active_events, (void *)&ci, sizeof(ci), free, NULL)); 
    240243  pthread_mutex_unlock(&active_events_lock); 
    241244  ci->check->flags &= ~NP_RUNNING; 
     
    343346 
    344347static void 
    345 nc_printf_dns_handle_brief(noit_console_closure_t ncct, 
     348nc_printf_dns_handle_brief(mtev_console_closure_t ncct, 
    346349                           dns_ctx_handle_t *h) { 
    347350  nc_printf(ncct, "== %s ==\n", h->hkey); 
     
    357360} 
    358361static int 
    359 noit_console_show_dns(noit_console_closure_t ncct, 
     362noit_console_show_dns(mtev_console_closure_t ncct, 
    360363                      int argc, char **argv, 
    361                       noit_console_state_t *dstate, 
     364                      mtev_console_state_t *dstate, 
    362365                      void *closure) { 
    363   noit_hash_iter iter = NOIT_HASH_ITER_ZERO; 
     366  mtev_hash_iter iter = MTEV_HASH_ITER_ZERO; 
    364367  uuid_t key_id; 
    365368  int klen; 
     
    367370 
    368371  pthread_mutex_lock(&dns_ctx_store_lock); 
    369   while(noit_hash_next(&dns_ctx_store, &iter, 
     372  while(mtev_hash_next(&dns_ctx_store, &iter, 
    370373                       (const char **)key_id, &klen, 
    371374                       &vts)) { 
     
    379382static void 
    380383register_console_dns_commands() { 
    381   noit_console_state_t *tl; 
     384  mtev_console_state_t *tl; 
    382385  cmd_info_t *showcmd; 
    383386 
    384   tl = noit_console_state_initial(); 
    385   showcmd = noit_console_state_get_cmd(tl, "show"); 
     387  tl = mtev_console_state_initial(); 
     388  showcmd = mtev_console_state_get_cmd(tl, "show"); 
    386389  assert(showcmd && showcmd->dstate); 
    387   noit_console_state_add_cmd(showcmd->dstate, 
     390  mtev_console_state_add_cmd(showcmd->dstate, 
    388391    NCSCMD("dns_module", noit_console_show_dns, NULL, NULL, NULL)); 
    389392} 
     
    402405 
    403406  conf->contexts = DEFAULT_MAX_CONTEXTS; 
    404   if(noit_hash_retr_str(conf->options, 
     407  if(mtev_hash_retr_str(conf->options, 
    405408                         "contexts", strlen("contexts"), 
    406409                         (const char**)&config_val)) { 
     
    411414  /* HASH the rr types */ 
    412415  for(i=0, nv = dns_type_index(i); nv->name; nv = dns_type_index(++i)) 
    413     noit_hash_store(&dns_rtypes, 
     416    mtev_hash_store(&dns_rtypes, 
    414417                    nv->name, strlen(nv->name), 
    415418                    (void *)nv); 
    416419  /* HASH the class types */ 
    417420  for(i=0, nv = dns_class_index(i); nv->name; nv = dns_class_index(++i)) 
    418     noit_hash_store(&dns_ctypes, 
     421    mtev_hash_store(&dns_ctypes, 
    419422                    nv->name, strlen(nv->name), 
    420423                    (void *)nv); 
     
    426429 
    427430  if (dns_init(NULL, 0) < 0 || (pctx = dns_new(NULL)) == NULL) { 
    428     noitL(nlerr, "Unable to initialize dns subsystem\n"); 
     431    mtevL(nlerr, "Unable to initialize dns subsystem\n"); 
    429432    return -1; 
    430433  } 
    431434  dns_free(pctx); 
    432435  if(dns_module_dns_ctx_alloc(self, NULL, 0) == NULL) { 
    433     noitL(nlerr, "Error setting up default dns resolver context.\n"); 
     436    mtevL(nlerr, "Error setting up default dns resolver context.\n"); 
    434437    return -1; 
    435438  } 
     
    541544    goto decode_err; 
    542545  } 
    543   noitL(nldeb, "%s. %u %s %s\n", dns_dntosp(dn), rr->dnsrr_ttl, 
     546  mtevL(nldeb, "%s. %u %s %s\n", dns_dntosp(dn), rr->dnsrr_ttl, 
    544547        dns_classname(rr->dnsrr_cls), 
    545548        dns_typename(rr->dnsrr_typ)); 
     
    690693 
    691694        /* Now follow the leader */ 
    692         noitL(nldeb, "%s. CNAME %s.\n", dns_dntosp(dn), 
     695        mtevL(nldeb, "%s. CNAME %s.\n", dns_dntosp(dn), 
    693696              dns_dntosp(p.dnsp_dnbuf)); 
    694697        dns_dntodn(p.dnsp_dnbuf, dn, sizeof(dn)); 
    695         noitL(nldeb, " ---> '%s'\n", dns_dntosp(dn)); 
     698        mtevL(nldeb, " ---> '%s'\n", dns_dntosp(dn)); 
    696699      } 
    697700    } 
     
    754757  char interpolated_nameserver[1024]; 
    755758  char interpolated_query[1024]; 
    756   noit_hash_table check_attrs_hash = NOIT_HASH_EMPTY; 
     759  mtev_hash_table check_attrs_hash = MTEV_HASH_EMPTY; 
    757760 
    758761  BAIL_ON_RUNNING_CHECK(check); 
     
    786789  } 
    787790 
    788   if(noit_hash_retr_str(check->config, "port", strlen("port"), 
     791  if(mtev_hash_retr_str(check->config, "port", strlen("port"), 
    789792                        &port_str)) { 
    790793    port = atoi(port_str); 
     
    792795 
    793796#define CONFIG_OVERRIDE(a) \ 
    794   if(noit_hash_retr_str(check->config, #a, strlen(#a), \ 
     797  if(mtev_hash_retr_str(check->config, #a, strlen(#a), \ 
    795798                        &config_val) && \ 
    796799     strlen(config_val) > 0) \ 
     
    821824    query = interpolated_query; 
    822825  } 
    823   noit_hash_destroy(&check_attrs_hash, NULL, NULL); 
    824   noitL(nldeb, "dns_check_send(%p,%s,%s,%s,%s,%s)\n", 
     826  mtev_hash_destroy(&check_attrs_hash, NULL, NULL); 
     827  mtevL(nldeb, "dns_check_send(%p,%s,%s,%s,%s,%s)\n", 
    825828        self, check->target, nameserver ? nameserver : "default", 
    826829        query ? query : "null", ctype, rtype); 
     
    842845 
    843846  /* Lookup out class */ 
    844   if(!noit_hash_retrieve(&dns_ctypes, ctype, strlen(ctype), 
     847  if(!mtev_hash_retrieve(&dns_ctypes, ctype, strlen(ctype), 
    845848                         &vnv_pair)) { 
    846849    if(ci->error) free(ci->error); 
     
    852855  } 
    853856  /* Lookup out rr type */ 
    854   if(!noit_hash_retrieve(&dns_rtypes, rtype, strlen(rtype), 
     857  if(!mtev_hash_retrieve(&dns_rtypes, rtype, strlen(rtype), 
    855858                         &vnv_pair)) { 
    856859    if(ci->error) free(ci->error); 
     
    912915} 
    913916 
    914 static int dns_config(noit_module_t *self, noit_hash_table *options) { 
     917static int dns_config(noit_module_t *self, mtev_hash_table *options) { 
    915918  dns_mod_config_t *conf; 
    916919  conf = noit_module_get_userdata(self); 
    917920  if(conf) { 
    918921    if(conf->options) { 
    919       noit_hash_destroy(conf->options, free, free); 
     922      mtev_hash_destroy(conf->options, free, free); 
    920923      free(conf->options); 
    921924    } 
     
    928931} 
    929932 
    930 static int dns_onload(noit_image_t *self) { 
    931   nlerr = noit_log_stream_find("error/dns"); 
    932   nldeb = noit_log_stream_find("debug/dns"); 
     933static int dns_onload(mtev_image_t *self) { 
     934  nlerr = mtev_log_stream_find("error/dns"); 
     935  nldeb = mtev_log_stream_find("debug/dns"); 
    933936  if(!nlerr) nlerr = noit_stderr; 
    934937  if(!nldeb) nldeb = noit_debug; 
  • src/modules/external.c

    rfc49c46 r304ec80  
    22 * Copyright (c) 2007, OmniTI Computer Consulting, Inc. 
    33 * All rights reserved. 
     4 * Copyright (c) 2015, Circonus, Inc. All rights reserved. 
    45 * 
    56 * Redistribution and use in source and binary forms, with or without 
     
    3132 */ 
    3233 
    33 #include "noit_defines.h" 
     34#include <mtev_defines.h> 
    3435 
    3536#include <stdio.h> 
     
    5152#include <pcre.h> 
    5253 
     54#include <mtev_security.h> 
     55 
    5356#include "noit_module.h" 
    5457#include "noit_check.h" 
    5558#include "noit_check_tools.h" 
    56 #include "utils/noit_log.h" 
    57 #include "utils/noit_security.h" 
     59#include "noit_mtev_bridge.h" 
    5860#include "external_proc.h" 
    5961 
     
    110112 */ 
    111113 
    112 static int external_config(noit_module_t *self, noit_hash_table *options) { 
     114static int external_config(noit_module_t *self, mtev_hash_table *options) { 
    113115  external_data_t *data; 
    114116  data = noit_module_get_userdata(self); 
    115117  if(data) { 
    116118    if(data->options) { 
    117       noit_hash_destroy(data->options, free, free); 
     119      mtev_hash_destroy(data->options, free, free); 
    118120      free(data->options); 
    119121    } 
     
    137139  ci = (struct check_info *)check->closure; 
    138140 
    139   noitL(data->nldeb, "external(%s) (error: %d, exit: %x)\n", 
     141  mtevL(data->nldeb, "external(%s) (error: %d, exit: %x)\n", 
    140142        check->target, ci->errortype, ci->exit_code); 
    141143 
     
    168170    char* output = ci->output; 
    169171    len = strlen(output); 
    170     noitL(data->nldeb, "going to match output at %d/%d\n", startoffset, len); 
     172    mtevL(data->nldeb, "going to match output at %d/%d\n", startoffset, len); 
    171173    if (data->type == EXTERNAL_NAGIOS_TYPE) { 
    172174      pcre *matcher; 
     
    219221      char value[128]; 
    220222      startoffset = ovector[1]; 
    221       noitL(data->nldeb, "matched at offset %d\n", rc); 
     223      mtevL(data->nldeb, "matched at offset %d\n", rc); 
    222224      if(pcre_copy_named_substring(ci->matcher, output, ovector, rc, 
    223225                                   "key", metric, sizeof(metric)) > 0 && 
     
    243245        } 
    244246      } 
    245       noitL(data->nldeb, "going to match output at %d/%d\n", startoffset, len); 
    246     } 
    247     noitL(data->nldeb, "match failed.... %d\n", rc); 
     247      mtevL(data->nldeb, "going to match output at %d/%d\n", startoffset, len); 
     248    } 
     249    mtevL(data->nldeb, "match failed.... %d\n", rc); 
    248250  } 
    249251 
     
    261263    char uuid_str[37]; 
    262264    uuid_unparse_lower(check->checkid, uuid_str); 
    263     noitL(data->nlerr, "external/%s: (sig:%d%s) [%s]\n", uuid_str, 
     265    mtevL(data->nlerr, "external/%s: (sig:%d%s) [%s]\n", uuid_str, 
    264266          WTERMSIG(ci->exit_code), WCOREDUMP(ci->exit_code)?", cored":"", 
    265267          ci->error ? ci->error : ""); 
     
    406408 
    407409    /* Lookup data in check_no hash */ 
    408     if(noit_hash_retrieve(&data->external_checks, 
     410    if(mtev_hash_retrieve(&data->external_checks, 
    409411                          (const char *)&data->cr->check_no, 
    410412                          sizeof(data->cr->check_no), 
     
    415417    /* We've seen it, it ain't coming again... 
    416418     * remove it, we'll free it ourselves */ 
    417     noit_hash_delete(&data->external_checks, 
     419    mtev_hash_delete(&data->external_checks, 
    418420                     (const char *)&data->cr->check_no, 
    419421                     sizeof(data->cr->check_no), NULL, NULL); 
     
    448450 
    449451 widowed: 
    450   noitL(noit_error, "external module terminated, must restart.\n"); 
     452  mtevL(noit_error, "external module terminated, must restart.\n"); 
    451453  exit(1); 
    452454} 
     
    458460  data = noit_module_get_userdata(self); 
    459461  if(!data) data = calloc(1, sizeof(*data)); 
    460   data->nlerr = noit_log_stream_find("error/external"); 
    461   data->nldeb = noit_log_stream_find("debug/external"); 
     462  data->nlerr = mtev_log_stream_find("error/external"); 
     463  data->nldeb = mtev_log_stream_find("debug/external"); 
    462464 
    463465  data->jobq = calloc(1, sizeof(*data->jobq)); 
     
    466468 
    467469  if (data->options) { 
    468     (void)noit_hash_retr_str(data->options, "path", strlen("path"), &path); 
     470    (void)mtev_hash_retr_str(data->options, "path", strlen("path"), &path); 
    469471    if (path) { 
    470472      if (path[strlen(path)-1] == '/') { 
     
    483485      data->path = strdup("/"); 
    484486    } 
    485     (void)noit_hash_retr_str(data->options, "nagios_regex", strlen("nagios_regex"), &nagios_regex); 
     487    (void)mtev_hash_retr_str(data->options, "nagios_regex", strlen("nagios_regex"), &nagios_regex); 
    486488    if (nagios_regex) { 
    487489      data->nagios_regex = strdup(nagios_regex); 
     
    499501  if(socketpair(AF_UNIX, SOCK_STREAM, 0, data->pipe_n2e) != 0 || 
    500502     socketpair(AF_UNIX, SOCK_STREAM, 0, data->pipe_e2n) != 0) { 
    501     noitL(noit_error, "external: pipe() failed: %s\n", strerror(errno)); 
     503    mtevL(noit_error, "external: pipe() failed: %s\n", strerror(errno)); 
    502504    free(data->jobq); 
    503505    free(data); 
     
    508510  if(data->child == -1) { 
    509511    /* No child, bail. */ 
    510     noitL(noit_error, "external: fork() failed: %s\n", strerror(errno)); 
     512    mtevL(noit_error, "external: fork() failed: %s\n", strerror(errno)); 
    511513    free(data->jobq); 
    512514    free(data); 
     
    525527      close(data->pipe_n2e[1]); 
    526528      close(data->pipe_e2n[0]); 
    527       noitL(noit_error, 
     529      mtevL(noit_error, 
    528530            "external: could not set pipe non-blocking: %s\n", 
    529531            strerror(errno)); 
     
    542544    const char *user = NULL, *group = NULL; 
    543545    if(data->options) { 
    544       (void)noit_hash_retr_str(data->options, "user", strlen("user"), &user); 
    545       (void)noit_hash_retr_str(data->options, "group", strlen("group"), &group); 
    546     } 
    547     noit_security_usergroup(user, group, noit_false); 
     546      (void)mtev_hash_retr_str(data->options, "user", strlen("user"), &user); 
     547      (void)mtev_hash_retr_str(data->options, "group", strlen("group"), &group); 
     548    } 
     549    mtev_security_usergroup(user, group, mtev_false); 
    548550    exit(external_child(data)); 
    549551  } 
     
    583585  } \ 
    584586  if (written_bytes != l) { \ 
    585     noitL(noit_error, "written_bytes not equal to write length in external.c assert_write, aborting...\n"); \ 
     587    mtevL(noit_error, "written_bytes not equal to write length in external.c assert_write, aborting...\n"); \ 
    586588    abort(); \ 
    587589  } \ 
     
    600602  if (!mask) { 
    601603    if (!ci->written) { 
    602       noitL(noit_error, "never wrote to external_proc for %lld - marking check not running\n", (long long int)ci->check_no); 
     604      mtevL(noit_error, "never wrote to external_proc for %lld - marking check not running\n", (long long int)ci->check_no); 
    603605      ci->check->flags &= ~NP_RUNNING; 
    604606    } 
     
    632634  eventer_t newe; 
    633635  external_data_t *data; 
    634   noit_hash_table check_attrs_hash = NOIT_HASH_EMPTY; 
     636  mtev_hash_table check_attrs_hash = MTEV_HASH_EMPTY; 
    635637  int i, klen; 
    636   noit_hash_iter iter = NOIT_HASH_ITER_ZERO; 
     638  mtev_hash_iter iter = MTEV_HASH_ITER_ZERO; 
    637639  const char *name, *value, *command; 
    638640  char resolved_path[PATH_MAX]; 
     
    644646  BAIL_ON_RUNNING_CHECK(check); 
    645647  check->flags |= NP_RUNNING; 
    646   noitL(data->nldeb, "external_invoke(%p,%s)\n", 
     648  mtevL(data->nldeb, "external_invoke(%p,%s)\n", 
    647649        self, check->target); 
    648650 
     
    663665 
    664666  /* Setup all our check bits */ 
    665   ci->check_no = noit_atomic_inc64(&data->check_no_seq); 
     667  ci->check_no = mtev_atomic_inc64(&data->check_no_seq); 
    666668  ci->check = check; 
    667669 
    668670  /* Pull the command value */ 
    669   if(noit_hash_retr_str(check->config, "command", strlen("command"), 
     671  if(mtev_hash_retr_str(check->config, "command", strlen("command"), 
    670672                        &command) == 0) { 
    671673    command = "/bin/true"; 
     
    684686 
    685687  /* We might want to extract metrics */ 
    686   if(noit_hash_retr_str(check->config, 
     688  if(mtev_hash_retr_str(check->config, 
    687689                        "output_extract", strlen("output_extract"), 
    688690                        &value) != 0) { 
     
    698700    } 
    699701    if(!ci->matcher) { 
    700       noitL(data->nlerr, "external pcre /%s/ failed @ %d: %s\n", 
     702      mtevL(data->nlerr, "external pcre /%s/ failed @ %d: %s\n", 
    701703            value, erroffset, error); 
    702704    } 
     
    710712    char argname[10]; 
    711713    snprintf(argname, sizeof(argname), "arg%d", i); 
    712     if(noit_hash_retr_str(check->config, argname, strlen(argname), 
     714    if(mtev_hash_retr_str(check->config, argname, strlen(argname), 
    713715                          &value) == 0) break; 
    714716    i++; 
     
    726728    char argname[10]; 
    727729    snprintf(argname, sizeof(argname), "arg%d", i); 
    728     if(noit_hash_retr_str(check->config, argname, strlen(argname), 
     730    if(mtev_hash_retr_str(check->config, argname, strlen(argname), 
    729731                          &value) == 0) { 
    730732      if(i == 0) { 
     
    746748  memset(&iter, 0, sizeof(iter)); 
    747749  ci->envcnt = 0; 
    748   while(noit_hash_next_str(check->config, &iter, &name, &klen, &value)) 
     750  while(mtev_hash_next_str(check->config, &iter, &name, &klen, &value)) 
    749751    if(!strncasecmp(name, "env_", 4)) 
    750752      ci->envcnt++; 
     
    753755  ci->envs = calloc(ci->envcnt, sizeof(*ci->envs)); 
    754756  ci->envcnt = 0; 
    755   while(noit_hash_next_str(check->config, &iter, &name, &klen, &value)) 
     757  while(mtev_hash_next_str(check->config, &iter, &name, &klen, &value)) 
    756758    if(!strncasecmp(name, "env_", 4)) { 
    757759      snprintf(interp_fmt, sizeof(interp_fmt), "%s=%s", name+4, value); 
     
    763765    } 
    764766 
    765   noit_hash_destroy(&check_attrs_hash, NULL, NULL); 
    766  
    767   noit_hash_store(&data->external_checks, 
     767  mtev_hash_destroy(&check_attrs_hash, NULL, NULL); 
     768 
     769  mtev_hash_store(&data->external_checks, 
    768770                  (const char *)&ci->check_no, sizeof(ci->check_no), 
    769771                  ci); 
     
    804806} 
    805807 
    806 static int external_onload(noit_image_t *self) { 
     808static int external_onload(mtev_image_t *self) { 
    807809  eventer_name_callback("external/timeout", external_timeout); 
    808810  eventer_name_callback("external/handler", external_handler); 
  • src/modules/external_proc.c

    rfc49c46 r304ec80  
    22 * Copyright (c) 2007, OmniTI Computer Consulting, Inc. 
    33 * All rights reserved. 
     4 * Copyright (c) 2015, Circonus, Inc. All rights reserved. 
    45 * 
    56 * Redistribution and use in source and binary forms, with or without 
     
    3132 */ 
    3233 
    33 #include "noit_defines.h" 
     34#include <mtev_defines.h> 
     35 
    3436#include <unistd.h> 
    3537#include <fcntl.h> 
     
    4345#endif 
    4446 
    45 #include "utils/noit_skiplist.h" 
    46 #include "utils/noit_log.h" 
     47#include <mtev_skiplist.h> 
     48 
     49#include "noit_mtev_bridge.h" 
    4750#include "external_proc.h" 
    4851 
    4952static void finish_procs(); 
    50 static noit_log_stream_t nlerr = NULL; 
    51 static noit_log_stream_t nldeb = NULL; 
     53static mtev_log_stream_t nlerr = NULL; 
     54static mtev_log_stream_t nldeb = NULL; 
    5255int in_fd, out_fd; 
    5356 
     
    7881} 
    7982 
    80 noit_skiplist active_procs; 
    81 noit_skiplist done_procs; 
     83mtev_skiplist active_procs; 
     84mtev_skiplist done_procs; 
    8285 
    8386static int __proc_state_check_no(const void *av, const void *bv) { 
     
    112115 
    113116static void process_siglist() { 
    114   noit_skiplist_node *iter = NULL; 
     117  mtev_skiplist_node *iter = NULL; 
    115118  struct proc_state *ps; 
    116119  pid_t pid; 
     
    119122    pid = waitpid(0, &status, WNOHANG); 
    120123    if(pid <= 0) break; 
    121     ps = noit_skiplist_find_compare(&active_procs, &pid, &iter, __proc_state_pid); 
    122     noitL((ps?nldeb:nlerr), "reaped pid %d (check: %lld) -> %x\n", 
     124    ps = mtev_skiplist_find_compare(&active_procs, &pid, &iter, __proc_state_pid); 
     125    mtevL((ps?nldeb:nlerr), "reaped pid %d (check: %lld) -> %x\n", 
    123126          pid, (long long int)(ps?ps->check_no:-1), status); 
    124127    if(ps) { 
    125       int rv = noit_skiplist_remove_compare(&active_procs, &ps->pid, NULL,  __proc_state_pid); 
     128      int rv = mtev_skiplist_remove_compare(&active_procs, &ps->pid, NULL,  __proc_state_pid); 
    126129      if (!rv) { 
    127         noitL(noit_error, "error: couldn't remove PID %d from active_procs in external\n", ps->pid); 
     130        mtevL(noit_error, "error: couldn't remove PID %d from active_procs in external\n", ps->pid); 
    128131      } 
    129       noit_skiplist_insert(&done_procs, ps); 
     132      mtev_skiplist_insert(&done_procs, ps); 
    130133    } 
    131134  } 
     
    134137static void fetch_and_kill_by_check(int64_t check_no) { 
    135138  struct proc_state *ps; 
    136   ps = noit_skiplist_find(&active_procs, &check_no, NULL); 
     139  ps = mtev_skiplist_find(&active_procs, &check_no, NULL); 
    137140  if(ps) { 
    138141    ps->cancelled = 1; 
     
    193196 
    194197  if(fstat(bfd, &buf) == -1) { 
    195     noitL(nldeb, "external: fstat error: %s\n", strerror(errno)); 
     198    mtevL(nldeb, "external: fstat error: %s\n", strerror(errno)); 
    196199    goto bail; 
    197200  } 
     
    205208  mmap_buf = mmap(NULL, outlen, PROT_READ, MAP_SHARED, bfd, 0); 
    206209  if(mmap_buf == (char *)-1) { 
    207     noitL(nldeb, "external: mmap error: %s\n", strerror(errno)); 
     210    mtevL(nldeb, "external: mmap error: %s\n", strerror(errno)); 
    208211    goto bail; 
    209212  } 
     
    226229  struct proc_state *ps; 
    227230  process_siglist(); 
    228   noitL(noit_debug, "%d done procs to cleanup\n", done_procs.size); 
    229   while((ps = noit_skiplist_pop(&done_procs, NULL)) != NULL) { 
    230     noitL(noit_debug, "finished %lld/%d\n", (long long int)ps->check_no, ps->pid); 
     231  mtevL(noit_debug, "%d done procs to cleanup\n", done_procs.size); 
     232  while((ps = mtev_skiplist_pop(&done_procs, NULL)) != NULL) { 
     233    mtevL(noit_debug, "finished %lld/%d\n", (long long int)ps->check_no, ps->pid); 
    231234    if(ps->cancelled == 0) { 
    232235      assert_write(out_fd, &ps->check_no, 
     
    246249  char stderrfile[PATH_MAX]; 
    247250 
    248   noitL(nldeb, "About to spawn: (%s)\n", ps->path); 
     251  mtevL(nldeb, "About to spawn: (%s)\n", ps->path); 
    249252  strlcpy(stdoutfile, "/tmp/noitext.XXXXXX", PATH_MAX); 
    250253  ps->stdout_fd = mkstemp(stdoutfile); 
     
    260263  /* Here.. fork has succeeded */ 
    261264  if(ps->pid) { 
    262     noit_skiplist_insert(&active_procs, ps); 
     265    mtev_skiplist_insert(&active_procs, ps); 
    263266    return 0; 
    264267  } 
     
    275278 prefork_fail: 
    276279  ps->status = -1; 
    277   noit_skiplist_insert(&done_procs, ps); 
     280  mtev_skiplist_insert(&done_procs, ps); 
    278281  return -1; 
    279282} 
     
    291294  /* switch to / */ 
    292295  if(chdir("/") != 0) { 
    293     noitL(noit_error, "Failed chdir(\"/\"): %s\n", strerror(errno)); 
     296    mtevL(noit_error, "Failed chdir(\"/\"): %s\n", strerror(errno)); 
    294297    return -1; 
    295298  } 
    296299 
    297   noit_skiplist_init(&active_procs); 
    298   noit_skiplist_set_compare(&active_procs, __proc_state_check_no, 
     300  mtev_skiplist_init(&active_procs); 
     301  mtev_skiplist_set_compare(&active_procs, __proc_state_check_no, 
    299302                            __proc_state_check_no_key); 
    300   noit_skiplist_add_index(&active_procs, __proc_state_pid, 
     303  mtev_skiplist_add_index(&active_procs, __proc_state_pid, 
    301304                          __proc_state_pid_key); 
    302   noit_skiplist_init(&done_procs); 
    303   noit_skiplist_set_compare(&done_procs, __proc_state_check_no, 
     305  mtev_skiplist_init(&done_procs); 
     306  mtev_skiplist_set_compare(&done_procs, __proc_state_check_no, 
    304307                            __proc_state_check_no_key); 
    305308 
  • src/modules/external_proc.h

    rdad3f7f r304ec80  
    22 * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
    33 * All rights reserved. 
     4 * Copyright (c) 2015, Circonus, Inc. All rights reserved. 
    45 * 
    56 * Redistribution and use in source and binary forms, with or without 
     
    3435#define MODULES_EXTERNAL_PROC_H 
    3536 
    36 #include "noit_defines.h" 
    37 #include "eventer/eventer.h" 
    38 #include "utils/noit_atomic.h" 
    39 #include "utils/noit_hash.h" 
     37#include <mtev_defines.h> 
     38#include <eventer/eventer.h> 
     39#include <mtev_atomic.h> 
     40#include <mtev_hash.h> 
    4041 
    4142typedef enum { 
     
    5556}; 
    5657typedef struct { 
    57   noit_log_stream_t nlerr; 
    58   noit_log_stream_t nldeb; 
     58  mtev_log_stream_t nlerr; 
     59  mtev_log_stream_t nldeb; 
    5960  int child; 
    6061  int pipe_n2e[2]; 
     
    6465  external_special_t type; 
    6566  eventer_jobq_t *jobq; 
    66   noit_atomic64_t check_no_seq; 
    67   noit_hash_table external_checks; 
    68   noit_hash_table *options; 
     67  mtev_atomic64_t check_no_seq; 
     68  mtev_hash_table external_checks; 
     69  mtev_hash_table *options; 
    6970 
    7071  struct external_response *cr; 
  • src/modules/fq_driver.c

    r1174acf r304ec80  
    11/* 
    22 * Copyright (c) 2011, OmniTI Computer Consulting, Inc. 
    3  * Copyright (c) 2013, Circonus, Inc. 
    43 * All rights reserved. 
     4 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
    55 * 
    66 * Redistribution and use in source and binary forms, with or without 
     
    3434#endif 
    3535 
    36 #include "noit_defines.h" 
    37 #include "noit_module.h" 
    38 #include "eventer/eventer.h" 
    39 #include "utils/noit_log.h" 
     36#include <mtev_defines.h> 
     37 
     38#include <assert.h> 
     39#include <fq.h> 
     40 
     41#include <mtev_dso.h> 
     42#include <eventer/eventer.h> 
     43#include <mtev_log.h> 
     44#include <mtev_conf.h> 
     45 
    4046#include "stratcon_iep.h" 
    41 #include "noit_conf.h" 
    42 #include "fq.h" 
    4347#include "fq_driver.xmlh" 
    44 #include <assert.h> 
    45  
    46 static noit_log_stream_t nlerr = NULL; 
     48 
     49static mtev_log_stream_t nlerr = NULL; 
    4750 
    4851typedef struct { 
    49   noit_atomic64_t publications; 
    50   noit_atomic64_t client_tx_drop; 
    51   noit_atomic64_t error_messages; 
    52   noit_atomic64_t no_exchange; 
    53   noit_atomic64_t no_route; 
    54   noit_atomic64_t routed; 
    55   noit_atomic64_t dropped; 
    56   noit_atomic64_t msgs_in; 
    57   noit_atomic64_t msgs_out; 
     52  mtev_atomic64_t publications; 
     53  mtev_atomic64_t client_tx_drop; 
     54  mtev_atomic64_t error_messages; 
     55  mtev_atomic64_t no_exchange; 
     56  mtev_atomic64_t no_route; 
     57  mtev_atomic64_t routed; 
     58  mtev_atomic64_t dropped; 
     59  mtev_atomic64_t msgs_in; 
     60  mtev_atomic64_t msgs_out; 
    5861} fq_stats_t; 
    5962 
     
    7881struct fq_driver global_fq_ctx = { 0 }; 
    7982 
    80 #define BUMPSTAT(i,a) noit_atomic_inc64(&global_fq_ctx.stats[i].a) 
     83#define BUMPSTAT(i,a) mtev_atomic_inc64(&global_fq_ctx.stats[i].a) 
    8184 
    8285/* This is very specific to an internal implementation somewhere... 
     
    149152static void fq_logger(fq_client c, const char *err) { 
    150153  int i; 
    151   noitL(nlerr, "fq: %s\n", err); 
     154  mtevL(nlerr, "fq: %s\n", err); 
    152155  for(i=0;i<global_fq_ctx.nhosts;i++) { 
    153156    if(c == global_fq_ctx.client[i]) { 
     
    158161} 
    159162 
    160 static iep_thread_driver_t *noit_fq_allocate(noit_conf_section_t conf) { 
     163static iep_thread_driver_t *noit_fq_allocate(mtev_conf_section_t conf) { 
    161164  char *hostname, *cp, *brk; 
    162165  int i; 
    163166 
    164 #define GETCONFSTR(w) noit_conf_get_stringbuf(conf, #w, global_fq_ctx.w, sizeof(global_fq_ctx.w)) 
     167#define GETCONFSTR(w) mtev_conf_get_stringbuf(conf, #w, global_fq_ctx.w, sizeof(global_fq_ctx.w)) 
    165168  snprintf(global_fq_ctx.exchange, sizeof(global_fq_ctx.exchange), "%s", 
    166169           "noit.firehose"); 
     
    172175  snprintf(global_fq_ctx.password, sizeof(global_fq_ctx.password), "%s", "guest"); 
    173176  GETCONFSTR(password); 
    174   if(!noit_conf_get_int(conf, "heartbeat", &global_fq_ctx.heartbeat)) 
     177  if(!mtev_conf_get_int(conf, "heartbeat", &global_fq_ctx.heartbeat)) 
    175178    global_fq_ctx.heartbeat = 2000; 
    176   if(!noit_conf_get_int(conf, "backlog", &global_fq_ctx.backlog)) 
     179  if(!mtev_conf_get_int(conf, "backlog", &global_fq_ctx.backlog)) 
    177180    global_fq_ctx.backlog = 10000; 
    178   if(!noit_conf_get_int(conf, "port", &global_fq_ctx.port)) 
     181  if(!mtev_conf_get_int(conf, "port", &global_fq_ctx.port)) 
    179182    global_fq_ctx.port = 8765; 
    180   (void)noit_conf_get_string(conf, "hostname", &hostname); 
     183  (void)mtev_conf_get_string(conf, "hostname", &hostname); 
    181184  if(!hostname) hostname = strdup("127.0.0.1"); 
    182185  for(cp = hostname; cp; cp = strchr(cp+1, ',')) global_fq_ctx.nhosts++; 
     
    253256  driver->msg_cnt++; 
    254257  fq_msg_exchange(msg, driver->exchange, strlen(driver->exchange)); 
    255   noitL(noit_debug, "route[%s] -> %s\n", driver->exchange, routingkey); 
     258  mtevL(mtev_debug, "route[%s] -> %s\n", driver->exchange, routingkey); 
    256259  fq_msg_route(msg, routingkey, strlen(routingkey)); 
    257260  fq_msg_id(msg, NULL); 
     
    281284}; 
    282285 
    283 static int noit_fq_driver_config(noit_dso_generic_t *self, noit_hash_table *o) { 
    284   return 0; 
    285 } 
    286 static int noit_fq_driver_onload(noit_image_t *self) { 
     286static int noit_fq_driver_config(mtev_dso_generic_t *self, mtev_hash_table *o) { 
     287  return 0; 
     288} 
     289static int noit_fq_driver_onload(mtev_image_t *self) { 
    287290  return 0; 
    288291} 
    289292 
    290293static int 
    291 noit_console_show_fq(noit_console_closure_t ncct, 
     294noit_console_show_fq(mtev_console_closure_t ncct, 
    292295                     int argc, char **argv, 
    293                      noit_console_state_t *dstate, 
     296                     mtev_console_state_t *dstate, 
    294297                     void *closure) { 
    295298  int i; 
     
    318321static void 
    319322register_console_fq_commands() { 
    320   noit_console_state_t *tl; 
     323  mtev_console_state_t *tl; 
    321324  cmd_info_t *showcmd; 
    322325 
    323   tl = noit_console_state_initial(); 
    324   showcmd = noit_console_state_get_cmd(tl, "show"); 
     326  tl = mtev_console_state_initial(); 
     327  showcmd = mtev_console_state_get_cmd(tl, "show"); 
    325328  assert(showcmd && showcmd->dstate); 
    326   noit_console_state_add_cmd(showcmd->dstate, 
     329  mtev_console_state_add_cmd(showcmd->dstate, 
    327330    NCSCMD("fq", noit_console_show_fq, NULL, NULL, NULL)); 
    328331} 
     
    360363} 
    361364 
    362 static int noit_fq_driver_init(noit_dso_generic_t *self) { 
    363   if(!nlerr) nlerr = noit_log_stream_find("error/fq_driver"); 
    364   if(!nlerr) nlerr = noit_error; 
     365static int noit_fq_driver_init(mtev_dso_generic_t *self) { 
     366  if(!nlerr) nlerr = mtev_log_stream_find("error/fq_driver"); 
     367  if(!nlerr) nlerr = mtev_error; 
    365368  stratcon_iep_mq_driver_register("fq", &mq_driver_fq); 
    366369  register_console_fq_commands(); 
     
    369372} 
    370373 
    371 noit_dso_generic_t fq_driver = { 
     374mtev_dso_generic_t fq_driver = { 
    372375  { 
    373     .magic = NOIT_GENERIC_MAGIC, 
    374     .version = NOIT_GENERIC_ABI_VERSION, 
     376    .magic = MTEV_GENERIC_MAGIC, 
     377    .version = MTEV_GENERIC_ABI_VERSION, 
    375378    .name = "fq_driver", 
    376379    .description = "FQ driver for IEP MQ submission", 
  • src/modules/ganglia.c

    r1b2dba3 r304ec80  
    11/* 
    2  * Copyright (c) 2013-2015, Circonus, Inc. 
    3  * All rights reserved. 
     2 * Copyright (c) 2013-2015, Circonus, Inc. All rights reserved. 
    43 * 
    54 * Redistribution and use in source and binary forms, with or without 
     
    3029 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    3130 */ 
    32 #include "noit_defines.h" 
    33 #include "utils/noit_str.h" 
     31 
     32#include <mtev_defines.h> 
    3433 
    3534#include <stdlib.h> 
     
    4241#include <string.h> 
    4342 
     43#include <mtev_str.h> 
     44#include <mtev_rest.h> 
     45#include <mtev_hash.h> 
     46#include <mtev_b64.h> 
     47 
    4448#include "noit_module.h" 
    4549#include "noit_check.h" 
    4650#include "noit_check_tools.h" 
    47 #include "noit_rest.h" 
    48 #include "utils/noit_log.h" 
    49 #include "utils/noit_hash.h" 
    50 #include "utils/noit_b64.h" 
     51#include "noit_mtev_bridge.h" 
    5152 
    5253#define GANGLIA_DEFAULT_MCAST_ADDR "239.2.11.71" 
     
    5455 
    5556typedef struct _mod_config { 
    56   noit_hash_table *options; 
    57   noit_boolean asynch_metrics; 
     57  mtev_hash_table *options; 
     58  mtev_boolean asynch_metrics; 
    5859  int ipv4_fd; 
    5960  int ipv6_fd; 
     
    9394}; 
    9495 
    95 static noit_boolean 
     96static mtev_boolean 
    9697noit_collects_check_asynch(noit_module_t *self, 
    9798                           noit_check_t *check) { 
    9899  const char *config_val; 
    99100  ganglia_mod_config_t *conf = noit_module_get_userdata(self); 
    100   noit_boolean is_asynch = conf->asynch_metrics; 
    101   if(noit_hash_retr_str(check->config, 
     101  mtev_boolean is_asynch = conf->asynch_metrics; 
     102  if(mtev_hash_retr_str(check->config, 
    102103                        "asynch_metrics", strlen("asynch_metrics"), 
    103104                        (const char **)&config_val)) { 
    104105    if(!strcasecmp(config_val, "false") || !strcasecmp(config_val, "off")) 
    105       is_asynch = noit_false; 
     106      is_asynch = mtev_false; 
    106107    else if(!strcasecmp(config_val, "true") || !strcasecmp(config_val, "on")) 
    107       is_asynch = noit_true; 
     108      is_asynch = mtev_true; 
    108109  } 
    109110 
     
    121122ganglia_process_dgram(noit_check_t *check, void *closure) { 
    122123  struct ganglia_dgram *pkt = closure; 
    123   noit_boolean immediate; 
     124  mtev_boolean immediate; 
    124125  ganglia_closure_t *gcl; 
    125126 
     
    181182                        } 
    182183    default: 
    183       noitL(noit_error, "ganglia: unknown packet type received\n"); 
     184      mtevL(noit_error, "ganglia: unknown packet type received\n"); 
    184185      return 0; 
    185186  } 
     
    209210      if(errno == EAGAIN) break; /* out of data to read, hand it back to eventer 
    210211                                    and wait to be scheduled again */ 
    211       noitLT(noit_error, now, "ganglia: recvfrom: %s\n", strerror(errno)); 
     212      mtevLT(noit_error, now, "ganglia: recvfrom: %s\n", strerror(errno)); 
    212213      break; 
    213214    } 
     
    220221    *len = ntohl(*len); 
    221222    if(!*len) { 
    222       noitL(noit_error, "ganglia: empty host\n"); 
     223      mtevL(noit_error, "ganglia: empty host\n"); 
    223224      return -1; 
    224225    } 
     
    230231    *len = ntohl(*len); 
    231232    if(!*len) { 
    232       noitL(noit_error, "ganglia: empty name\n"); 
     233      mtevL(noit_error, "ganglia: empty name\n"); 
    233234      return -1; 
    234235    } 
     
    255256 
    256257    if(!noit_poller_target_do(host, ganglia_process_dgram, &pkt)) 
    257       noitL(noit_error, "ganglia: no checks from host: %s\n", host); 
     258      mtevL(noit_error, "ganglia: no checks from host: %s\n", host); 
    258259  } 
    259260  return EVENTER_READ | EVENTER_EXCEPTION; 
     
    266267  ganglia_closure_t *gcl; 
    267268  struct timeval now, duration, age; 
    268   noit_boolean immediate; 
     269  mtev_boolean immediate; 
    269270  /* We are passive, so we don't do anything for transient checks */ 
    270271  if(check->flags & NP_TRANSIENT) return 0; 
     
    295296             "dur=%d,run=%d,stats=%d,ntfy=%d", check->stats.inprogress.duration,  
    296297             check->generation, gcl->stats_count, gcl->ntfy_count); 
    297     noitL(noit_debug, "ganglia(%s) [%s]\n", check->target, human_buffer); 
     298    mtevL(noit_debug, "ganglia(%s) [%s]\n", check->target, human_buffer); 
    298299 
    299300    check->stats.inprogress.available = (gcl->ntfy_count > 0 || gcl->stats_count > 0) ?  
     
    320321} 
    321322 
    322 static int noit_ganglia_config(noit_module_t *self, noit_hash_table *options) { 
     323static int noit_ganglia_config(noit_module_t *self, mtev_hash_table *options) { 
    323324  ganglia_mod_config_t *conf = noit_module_get_userdata(self); 
    324325  if(conf) { 
    325326    if(conf->options) { 
    326       noit_hash_destroy(conf->options, free, free); 
     327      mtev_hash_destroy(conf->options, free, free); 
    327328      free(conf->options); 
    328329    } 
     
    335336} 
    336337 
    337 static int noit_ganglia_onload(noit_image_t *self) { 
     338static int noit_ganglia_onload(mtev_image_t *self) { 
    338339  eventer_name_callback("noit_ganglia/handler", noit_ganglia_handler); 
    339340  return 0; 
     
    352353  unsigned short port; 
    353354 
    354   conf->asynch_metrics = noit_true; 
    355   if(noit_hash_retr_str(conf->options, 
     355  conf->asynch_metrics = mtev_true; 
     356  if(mtev_hash_retr_str(conf->options, 
    356357                        "asynch_metrics", strlen("asynch_metrics"), 
    357358                        (const char **)&config_val)) { 
    358359    if(!strcasecmp(config_val, "false") || !strcasecmp(config_val, "off")) 
    359       conf->asynch_metrics = noit_false; 
     360      conf->asynch_metrics = mtev_false; 
    360361  } 
    361362 
    362363  /* Default Collectd port */ 
    363364  portint = GANGLIA_DEFAULT_MCAST_PORT; 
    364   if(noit_hash_retr_str(conf->options, 
     365  if(mtev_hash_retr_str(conf->options, 
    365366                         "port", strlen("port"), 
    366367                         (const char**)&config_val)) 
     
    368369  port = (unsigned short) portint; 
    369370 
    370   if(!noit_hash_retr_str(conf->options, 
     371  if(!mtev_hash_retr_str(conf->options, 
    371372                         "multiaddr", strlen("multiaddr"), 
    372373                         (const char**)&multiaddr)) 
     
    380381  if(conf->ipv4_fd < 0) { 
    381382    close(conf->ipv4_fd); 
    382     noitL(noit_error, "ganglia: ipv4 socket failed: %s\n", strerror(errno)); 
     383    mtevL(noit_error, "ganglia: ipv4 socket failed: %s\n", strerror(errno)); 
    383384    return -1; 
    384385  } 
     
    386387  if(eventer_set_fd_nonblocking(conf->ipv4_fd)) { 
    387388    close(conf->ipv4_fd); 
    388     noitL(noit_error, "ganglia: could not set ipv4 socket non-blocking: %s\n", strerror(errno)); 
     389    mtevL(noit_error, "ganglia: could not set ipv4 socket non-blocking: %s\n", strerror(errno)); 
    389390    return -1; 
    390391  } 
     
    398399  if(bind(conf->ipv4_fd, (struct sockaddr *)&skaddr, sizeof(skaddr))) { 
    399400    close(conf->ipv4_fd); 
    400     noitL(noit_error, "ganglia: ipv4 binding failed: %s\n", strerror(errno)); 
     401    mtevL(noit_error, "ganglia: ipv4 binding failed: %s\n", strerror(errno)); 
    401402    return -1; 
    402403  } 
     
    411412  if(setsockopt(conf->ipv4_fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq))) { 
    412413    close(conf->ipv4_fd); 
    413     noitL(noit_error, "ganglia: ipv4 multicast join failed: %s\n", strerror(errno)); 
     414    mtevL(noit_error, "ganglia: ipv4 multicast join failed: %s\n", strerror(errno)); 
    414415    return -1; 
    415416  } 
     
    422423  newe->closure = self; 
    423424  eventer_add(newe); 
    424   noitL(noit_debug, "ganglia: Added ipv4 handler!\n"); 
     425  mtevL(noit_debug, "ganglia: Added ipv4 handler!\n"); 
    425426 
    426427  portint = GANGLIA_DEFAULT_MCAST_PORT; 
    427   if(noit_hash_retr_str(conf->options, 
     428  if(mtev_hash_retr_str(conf->options, 
    428429                         "port6", strlen("port6"), 
    429430                         (const char**)&config_val)) 
     
    431432  port = (unsigned short) portint; 
    432433 
    433   if(!noit_hash_retr_str(conf->options, 
     434  if(!mtev_hash_retr_str(conf->options, 
    434435                         "multiaddr6", strlen("multiaddr6"), 
    435436                         (const char**)&multiaddr6)) 
     
    441442    conf->ipv6_fd = socket(AF_INET6, NE_SOCK_CLOEXEC|SOCK_DGRAM, IPPROTO_UDP); 
    442443    if(conf->ipv6_fd < 0) { 
    443       noitL(noit_error, "ganglia: IPv6 socket creation failed: %s\n", strerror(errno)); 
     444      mtevL(noit_error, "ganglia: IPv6 socket creation failed: %s\n", strerror(errno)); 
    444445    } 
    445446    else if(eventer_set_fd_nonblocking(conf->ipv6_fd)) { 
    446       noitL(noit_error, "ganglia: could not set socket non-blocking: %s\n", strerror(errno)); 
     447      mtevL(noit_error, "ganglia: could not set socket non-blocking: %s\n", strerror(errno)); 
    447448      close(conf->ipv6_fd); 
    448449      conf->ipv6_fd =  -1; 
     
    457458    skaddr6.sin6_port = htons(port); 
    458459    if(bind(conf->ipv6_fd, (struct sockaddr *)&skaddr6, sizeof(skaddr6))) { 
    459       noitL(noit_error, "ganglia: ipv6 binding failed: %s\n", strerror(errno)); 
     460      mtevL(noit_error, "ganglia: ipv6 binding failed: %s\n", strerror(errno)); 
    460461      close(conf->ipv6_fd); 
    461462      conf->ipv6_fd = -1; 
     
    472473 
    473474    if(setsockopt(conf->ipv6_fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreqv6, sizeof(mreqv6))) { 
    474       noitL(noit_error, "ganglia: ipv6 multicast join failed: %s\n", strerror(errno)); 
     475      mtevL(noit_error, "ganglia: ipv6 multicast join failed: %s\n", strerror(errno)); 
    475476      close(conf->ipv6_fd); 
    476477      conf->ipv6_fd = -1; 
     
    486487    newe->closure = self; 
    487488    eventer_add(newe); 
    488     noitL(noit_debug, "ganglia: Added ipv6 handler!\n"); 
     489    mtevL(noit_debug, "ganglia: Added ipv6 handler!\n"); 
    489490  } 
    490491 
  • src/modules/handoff_ingestor.c

    r1174acf r304ec80  
    22 * Copyright (c) 2011, OmniTI Computer Consulting, Inc. 
    33 * All rights reserved. 
     4 * Copyright (c) 2015, Circonus, Inc. All rights reserved. 
    45 * 
    56 * Redistribution and use in source and binary forms, with or without 
     
    3132 */ 
    3233 
    33 #include "noit_defines.h" 
    34 #include "noit_module.h" 
    35 #include "eventer/eventer.h" 
    36 #include "utils/noit_log.h" 
    37 #include "utils/noit_b64.h" 
    38 #include "utils/noit_str.h" 
    39 #include "utils/noit_mkdir.h" 
    40 #include "utils/noit_getip.h" 
    41 #include "stratcon_datastore.h" 
    42 #include "stratcon_realtime_http.h" 
    43 #include "stratcon_iep.h" 
    44 #include "noit_conf.h" 
    45 #include "noit_check.h" 
    46 #include "noit_rest.h" 
     34#include <mtev_defines.h> 
     35 
    4736#include <unistd.h> 
    4837#include <fcntl.h> 
     
    5443#include <assert.h> 
    5544#include <errno.h> 
     45 
     46#include <mtev_dso.h> 
     47#include <eventer/eventer.h> 
     48#include <mtev_log.h> 
     49#include <mtev_b64.h> 
     50#include <mtev_str.h> 
     51#include <mtev_mkdir.h> 
     52#include <mtev_getip.h> 
     53#include <mtev_conf.h> 
     54#include <mtev_rest.h> 
     55 
     56#include "stratcon_datastore.h" 
     57#include "stratcon_realtime_http.h" 
     58#include "stratcon_iep.h" 
     59 
    5660#include "handoff_ingestor.xmlh" 
    5761 
    58 static noit_http_session_ctx *the_one_and_only = NULL; 
    59 static noit_log_stream_t ds_err = NULL; 
    60 static noit_log_stream_t ds_deb = NULL; 
    61 static noit_log_stream_t ingest_err = NULL; 
     62static mtev_http_session_ctx *the_one_and_only = NULL; 
     63static mtev_log_stream_t ds_err = NULL; 
     64static mtev_log_stream_t ds_deb = NULL; 
     65static mtev_log_stream_t ingest_err = NULL; 
    6266static pthread_mutex_t http_ctx_lock = PTHREAD_MUTEX_INITIALIZER; 
    6367 
     
    7074 
    7175static char *basejpath = NULL; 
    72 static noit_hash_table uuid_map = NOIT_HASH_EMPTY; 
     76static mtev_hash_table uuid_map = MTEV_HASH_EMPTY; 
    7377 
    7478static void 
    7579stratcon_ingest_iep_check_preload() { 
    76   noitL(noit_debug, "iep_preload is a noop in handoff mode\n"); 
     80  mtevL(mtev_debug, "iep_preload is a noop in handoff mode\n"); 
    7781} 
    7882static void 
     
    9296      continue; 
    9397 
    94     noitL(noit_debug, "stratcon_ingest_find <- (%d, %s) @ %s\n", 
     98    mtevL(mtev_debug, "stratcon_ingest_find <- (%d, %s) @ %s\n", 
    9599          node->sid, remote_cn ? remote_cn : "(null)", dsn ? dsn : "(null)"); 
    96100 
     
    98102                                   remote_ip, sizeof(remote_ip)) == 0) { 
    99103      node->noit = strdup(remote_ip); 
    100       noitL(noit_debug, "lookup(cache): %s -> %s\n", remote_cn, node->noit); 
     104      mtevL(mtev_debug, "lookup(cache): %s -> %s\n", remote_cn, node->noit); 
    101105      continue; 
    102106    } 
     
    116120  if(remote_cn) actual_remote_cn = remote_cn; 
    117121  if(uuid_parse((char *)uuid_str, id) == 0) { 
    118     if(noit_hash_retrieve(&uuid_map, (const char *)id, UUID_SIZE, &vstr)) { 
     122    if(mtev_hash_retrieve(&uuid_map, (const char *)id, UUID_SIZE, &vstr)) { 
    119123      char *str = (char *)vstr; 
    120124      if(remote_cn && strcmp(str, remote_cn)) { 
     
    123127        memcpy(key, id, UUID_SIZE); 
    124128        actual_remote_cn = strdup(remote_cn); 
    125         noit_hash_replace(&uuid_map, key, UUID_SIZE, (void *)actual_remote_cn, 
     129        mtev_hash_replace(&uuid_map, key, UUID_SIZE, (void *)actual_remote_cn, 
    126130                          free, free); 
    127131      } 
     
    130134      void *key = malloc(UUID_SIZE); 
    131135      memcpy(key, id, UUID_SIZE); 
    132       noit_hash_store(&uuid_map, key, UUID_SIZE, strdup(remote_cn)); 
     136      mtev_hash_store(&uuid_map, key, UUID_SIZE, strdup(remote_cn)); 
    133137    } 
    134138  } 
     
    153157  r.s_addr = htonl((4 << 24) | (2 << 16) | (2 << 8) | 1); 
    154158  memset(&l, 0, sizeof(l)); 
    155   noit_getip_ipv4(r, &l); 
     159  mtev_getip_ipv4(r, &l); 
    156160  /* Ignore the error.. what are we going to do anyway */ 
    157161  if(inet_ntop(AF_INET, &l, ipv4_str, sizeof(ipv4_str)) == NULL) 
    158162    strlcpy(ipv4_str, "0.0.0.0", sizeof(ipv4_str)); 
    159163 
    160   buff = noit_conf_xml_in_mem(&len); 
     164  buff = mtev_conf_xml_in_mem(&len); 
    161165  if(!buff) goto bail; 
    162166 
     
    185189    snprintf(hfile, sizeof(hfile), "%s.h", path); 
    186190    if(link(path, hfile) < 0 && errno != EEXIST) { 
    187       noitL(noit_error, "cannot link journal %s: %s\n", path, strerror(errno)); 
     191      mtevL(mtev_error, "cannot link journal %s: %s\n", path, strerror(errno)); 
    188192      return -1; 
    189193    } 
     
    192196    strlcpy(hfile, path, sizeof(hfile)); 
    193197 
    194   noitL(noit_debug, " handoff -> %s\n", hfile); 
     198  mtevL(mtev_debug, " handoff -> %s\n", hfile); 
    195199  pthread_mutex_lock(&http_ctx_lock); 
    196200  if(the_one_and_only) { 
    197     noit_http_session_ctx *ctx = the_one_and_only; 
     201    mtev_http_session_ctx *ctx = the_one_and_only; 
    198202    snprintf(msg, sizeof(msg), "file:%s\r\n", hfile); 
    199     if(noit_http_response_append(ctx,msg,strlen(msg)) == noit_false || 
    200        noit_http_response_flush(ctx, noit_false) == noit_false) { 
    201       noitL(noit_error, "handoff endpoint disconnected\n"); 
     203    if(mtev_http_response_append(ctx,msg,strlen(msg)) == mtev_false || 
     204       mtev_http_response_flush(ctx, mtev_false) == mtev_false) { 
     205      mtevL(mtev_error, "handoff endpoint disconnected\n"); 
    202206      the_one_and_only = NULL; 
    203207    } 
     
    208212 
    209213static int 
    210 handoff_request_dispatcher(noit_http_session_ctx *ctx) { 
     214handoff_request_dispatcher(mtev_http_session_ctx *ctx) { 
    211215  char *hello = "message:hello\r\n"; 
    212216  if(the_one_and_only) { 
    213217    hello = "message:already connected\r\n"; 
    214     noit_http_response_server_error(ctx, "text/plain"); 
    215     noit_http_response_append(ctx, hello, strlen(hello)); 
    216     noit_http_response_end(ctx); 
     218    mtev_http_response_server_error(ctx, "text/plain"); 
     219    mtev_http_response_append(ctx, hello, strlen(hello)); 
     220    mtev_http_response_end(ctx); 
    217221    return 0; 
    218222  } 
    219223  pthread_mutex_lock(&http_ctx_lock); 
    220224  the_one_and_only = ctx; 
    221   noit_http_response_status_set(ctx, 200, "OK"); 
    222   noit_http_response_option_set(ctx, NOIT_HTTP_CHUNKED); 
    223   noit_http_response_header_set(ctx, "Content-Type", "text/plain"); 
    224   noit_http_response_append(ctx, hello, strlen(hello)); 
    225   noit_http_response_flush(ctx, noit_false); 
     225  mtev_http_response_status_set(ctx, 200, "OK"); 
     226  mtev_http_response_option_set(ctx, MTEV_HTTP_CHUNKED); 
     227  mtev_http_response_header_set(ctx, "Content-Type", "text/plain"); 
     228  mtev_http_response_append(ctx, hello, strlen(hello)); 
     229  mtev_http_response_flush(ctx, mtev_false); 
    226230  pthread_mutex_unlock(&http_ctx_lock); 
    227231  return EVENTER_EXCEPTION; 
     
    233237  int done = 0, rv; 
    234238  acceptor_closure_t *ac = closure; 
    235   noit_http_session_ctx *http_ctx = ac->service_ctx; 
    236   rv = noit_http_session_drive(e, mask, http_ctx, now, &done); 
     239  mtev_http_session_ctx *http_ctx = ac->service_ctx; 
     240  rv = mtev_http_session_drive(e, mask, http_ctx, now, &done); 
    237241  if(done) { 
    238242    pthread_mutex_lock(&http_ctx_lock); 
     
    245249 
    246250static int 
    247 handoff_stream(noit_http_rest_closure_t *restc, int npats, char **pats) { 
    248   noit_http_session_ctx *ctx = restc->http_ctx; 
    249   noit_http_connection *conn = noit_http_session_connection(ctx); 
     251handoff_stream(mtev_http_rest_closure_t *restc, int npats, char **pats) { 
     252  mtev_http_session_ctx *ctx = restc->http_ctx; 
     253  mtev_http_connection *conn = mtev_http_session_connection(ctx); 
    250254  eventer_t e; 
    251255  acceptor_closure_t *ac = restc->ac; 
     
    254258    ac->service_ctx_free(ac->service_ctx); 
    255259  ac->service_ctx = ctx; 
    256   ac->service_ctx_free = noit_http_ctx_acceptor_free; 
    257  
    258   e = noit_http_connection_event(conn); 
     260  ac->service_ctx_free = mtev_http_ctx_acceptor_free; 
     261 
     262  e = mtev_http_connection_event(conn); 
    259263  e->callback = handoff_http_handler; 
    260   noit_http_session_set_dispatcher(ctx, handoff_request_dispatcher, NULL); 
     264  mtev_http_session_set_dispatcher(ctx, handoff_request_dispatcher, NULL); 
    261265  return handoff_request_dispatcher(ctx); 
    262266} 
     
    271275}; 
    272276 
    273 static int handoff_ingestor_config(noit_dso_generic_t *self, noit_hash_table *o) { 
     277static int handoff_ingestor_config(mtev_dso_generic_t *self, mtev_hash_table *o) { 
    274278  return 0; 
    275279} 
    276 static int handoff_ingestor_onload(noit_image_t *self) { 
     280static int handoff_ingestor_onload(mtev_image_t *self) { 
    277281  return 0; 
    278282} 
    279 static int handoff_ingestor_init(noit_dso_generic_t *self) { 
    280   ds_err = noit_log_stream_find("error/datastore"); 
    281   ds_deb = noit_log_stream_find("debug/datastore"); 
    282   ingest_err = noit_log_stream_find("error/ingest"); 
    283   if(!ds_err) ds_err = noit_error; 
    284   if(!ingest_err) ingest_err = noit_error; 
    285   if(!noit_conf_get_string(NULL, "/stratcon/database/journal/path", 
     283static int handoff_ingestor_init(mtev_dso_generic_t *self) { 
     284  ds_err = mtev_log_stream_find("error/datastore"); 
     285  ds_deb = mtev_log_stream_find("debug/datastore"); 
     286  ingest_err = mtev_log_stream_find("error/ingest"); 
     287  if(!ds_err) ds_err = mtev_error; 
     288  if(!ingest_err) ingest_err = mtev_error; 
     289  if(!mtev_conf_get_string(NULL, "/stratcon/database/journal/path", 
    286290                           &basejpath)) { 
    287     noitL(noit_error, "/stratcon/database/journal/path is unspecified\n"); 
     291    mtevL(mtev_error, "/stratcon/database/journal/path is unspecified\n"); 
    288292    exit(-1); 
    289293  } 
    290   noitL(noit_error, "registering /handoff/journals REST endpoint\n"); 
    291   assert(noit_http_rest_register_auth( 
     294  mtevL(mtev_error, "registering /handoff/journals REST endpoint\n"); 
     295  assert(mtev_http_rest_register_auth( 
    292296    "GET", "/handoff/", "^journals$", handoff_stream, 
    293     noit_http_rest_client_cert_auth 
     297    mtev_http_rest_client_cert_auth 
    294298  ) == 0); 
    295299  return stratcon_datastore_set_ingestor(&handoff_ingestor_api); 
    296300} 
    297301 
    298 noit_dso_generic_t handoff_ingestor = { 
     302mtev_dso_generic_t handoff_ingestor = { 
    299303  { 
    300     .magic = NOIT_GENERIC_MAGIC, 
    301     .version = NOIT_GENERIC_ABI_VERSION, 
     304    .magic = MTEV_GENERIC_MAGIC, 
     305    .version = MTEV_GENERIC_ABI_VERSION, 
    302306    .name = "handoff_ingestor", 
    303307    .description = "data ingestion that just hands off to another process", 
  • src/modules/histogram.c

    r1174acf r304ec80  
    11/* 
    2  * Copyright (c) 2012-2015, Circonus, Inc. 
    3  * All rights reserved. 
     2 * Copyright (c) 2012-2015, Circonus, Inc. All rights reserved. 
    43 * 
    54 * Redistribution and use in source and binary forms, with or without 
     
    2928 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    3029 */ 
    31 #include "noit_defines.h" 
     30 
     31#include <mtev_defines.h> 
     32 
    3233#include <assert.h> 
    33 #include "utils/noit_b64.h" 
    34 #include "histogram_impl.h" 
     34 
     35#include <mtev_log.h> 
     36#include <mtev_b64.h> 
     37 
     38#include "noit_mtev_bridge.h" 
    3539#include "noit_module.h" 
    3640#include "noit_check.h" 
    3741#include "noit_check_tools.h" 
    38  
    39 static noit_log_stream_t metrics_log = NULL; 
     42#include "histogram_impl.h" 
     43 
     44static mtev_log_stream_t metrics_log = NULL; 
    4045static int histogram_module_id = -1; 
    4146 
    4247static int 
    43 histogram_onload(noit_image_t *self) { 
     48histogram_onload(mtev_image_t *self) { 
    4449  histogram_module_id = noit_check_register_module("histogram"); 
    4550  if(histogram_module_id < 0) return -1; 
     
    4853 
    4954static int 
    50 histogram_config(noit_dso_generic_t *self, noit_hash_table *o) { 
     55histogram_config(mtev_dso_generic_t *self, mtev_hash_table *o) { 
    5156  return 0; 
    5257} 
     
    6873      double v; 
    6974      hist_bucket_idx(ht, i, &v, &cnt); 
    70       noitL(noit_debug, "  %7.2g : %llu\n", v, cnt); 
     75      mtevL(noit_debug, "  %7.2g : %llu\n", v, cnt); 
    7176    } 
    7277  } 
     
    7580log_histo(noit_check_t *check, u_int64_t whence_s, 
    7681          const char *metric_name, histogram_t *h, 
    77           noit_boolean live_feed) { 
    78   noit_boolean extended_id = noit_false; 
     82          mtev_boolean live_feed) { 
     83  mtev_boolean extended_id = mtev_false; 
    7984  char uuid_str[256*3+37]; 
    8085  const char *v; 
     
    8893  SETUP_LOG(metrics, ); 
    8994  if(metrics_log) { 
    90     v = noit_log_stream_get_property(metrics_log, "extended_id"); 
    91     if(v && !strcmp(v, "on")) extended_id = noit_true; 
     95    v = mtev_log_stream_get_property(metrics_log, "extended_id"); 
     96    if(v && !strcmp(v, "on")) extended_id = mtev_true; 
    9297  } 
    9398  uuid_str[0] = '\0'; 
     
    108113  hist_serial = malloc(est); 
    109114  if(!hist_serial) { 
    110     noitL(noit_error, "malloc(%d) failed\n", (int)est); 
     115    mtevL(noit_error, "malloc(%d) failed\n", (int)est); 
    111116    goto cleanup; 
    112117  } 
     
    114119  hist_encode = malloc(enc_est); 
    115120  if(!hist_encode) { 
    116     noitL(noit_error, "malloc(%d) failed\n", (int)enc_est); 
     121    mtevL(noit_error, "malloc(%d) failed\n", (int)enc_est); 
    117122    goto cleanup; 
    118123  } 
    119124  if(hist_serialize(h, hist_serial, est) != est) { 
    120     noitL(noit_error, "histogram serialization failure\n"); 
     125    mtevL(noit_error, "histogram serialization failure\n"); 
    121126    goto cleanup; 
    122127  } 
    123   enc_est = noit_b64_encode((unsigned char *)hist_serial, est, 
     128  enc_est = mtev_b64_encode((unsigned char *)hist_serial, est, 
    124129                            hist_encode, enc_est); 
    125130  if(enc_est < 0) { 
    126     noitL(noit_error, "base64 histogram encoding failure\n"); 
     131    mtevL(noit_error, "base64 histogram encoding failure\n"); 
    127132    goto cleanup; 
    128133  } 
    129134 
    130135  if(live_feed && check->feeds) { 
    131     noit_skiplist_node *curr, *next; 
    132     curr = next = noit_skiplist_getlist(check->feeds); 
     136    mtev_skiplist_node *curr, *next; 
     137    curr = next = mtev_skiplist_getlist(check->feeds); 
    133138    while(curr) { 
    134139      const char *feed_name = (char *)curr->data; 
    135       noit_log_stream_t ls = noit_log_stream_find(feed_name); 
    136       noit_skiplist_next(check->feeds, &next); 
     140      mtev_log_stream_t ls = mtev_log_stream_find(feed_name); 
     141      mtev_skiplist_next(check->feeds, &next); 
    137142      if(!ls || 
    138          noit_log(ls, &whence, __FILE__, __LINE__, 
     143         mtev_log(ls, &whence, __FILE__, __LINE__, 
    139144           "H1\t%lu.%03lu\t%s\t%s\t%.*s\n", 
    140145           SECPART(&whence), MSECPART(&whence), 
     
    147152  if(!live_feed) { 
    148153    SETUP_LOG(metrics, goto cleanup); 
    149     noit_log(metrics_log, &whence, __FILE__, __LINE__, 
     154    mtev_log(metrics_log, &whence, __FILE__, __LINE__, 
    150155             "H1\t%lu.%03lu\t%s\t%s\t%.*s\n", 
    151156             SECPART(&whence), MSECPART(&whence), 
     
    193198 
    194199  /* push this out to the log streams */ 
    195   log_histo(check, aligned_seconds, name, tgt, noit_false); 
     200  log_histo(check, aligned_seconds, name, tgt, mtev_false); 
    196201  debug_print_hist(tgt); 
    197202 
     
    249254    if(ht->secs[last_bucket] && hist_num_buckets(ht->secs[last_bucket])) 
    250255      log_histo(check, last_minute * 60 + last_second, 
    251                 name, ht->secs[last_bucket], noit_true); 
     256                name, ht->secs[last_bucket], mtev_true); 
    252257  } 
    253258  if(minute > ht->last_minute) { 
     
    276281} 
    277282static void free_hash_o_histotier(void *vh) { 
    278   noit_hash_table *h = vh; 
    279   noit_hash_destroy(h, free, free_histotier); 
     283  mtev_hash_table *h = vh; 
     284  mtev_hash_destroy(h, free, free_histotier); 
    280285  free(h); 
    281286} 
    282 static noit_hook_return_t 
     287static mtev_hook_return_t 
    283288histogram_hook_impl(void *closure, noit_check_t *check, stats_t *stats, 
    284289                    metric_t *m) { 
    285290  void *vht; 
    286291  histotier *ht; 
    287   noit_hash_table *config, *metrics; 
     292  mtev_hash_table *config, *metrics; 
    288293  const char *track = ""; 
    289294 
    290295  config = noit_check_get_module_config(check, histogram_module_id); 
    291   if(!config || noit_hash_size(config) == 0) return NOIT_HOOK_CONTINUE; 
    292   noit_hash_retr_str(config, m->metric_name, strlen(m->metric_name), &track); 
     296  if(!config || mtev_hash_size(config) == 0) return MTEV_HOOK_CONTINUE; 
     297  mtev_hash_retr_str(config, m->metric_name, strlen(m->metric_name), &track); 
    293298  if(!track || strcmp(track, "add")) 
    294     return NOIT_HOOK_CONTINUE; 
     299    return MTEV_HOOK_CONTINUE; 
    295300 
    296301  metrics = noit_check_get_module_metadata(check, histogram_module_id); 
     
    300305                                   metrics, free_hash_o_histotier); 
    301306  } 
    302   if(!noit_hash_retrieve(metrics, m->metric_name, strlen(m->metric_name), 
     307  if(!mtev_hash_retrieve(metrics, m->metric_name, strlen(m->metric_name), 
    303308                         &vht)) { 
    304309    ht = calloc(1, sizeof(*ht)); 
    305310    vht = ht; 
    306     noit_hash_store(metrics, strdup(m->metric_name), strlen(m->metric_name), 
     311    mtev_hash_store(metrics, strdup(m->metric_name), strlen(m->metric_name), 
    307312                    vht); 
    308313  } 
     
    325330    } 
    326331  } 
    327   return NOIT_HOOK_CONTINUE; 
    328 } 
    329  
    330 static noit_hook_return_t 
     332  return MTEV_HOOK_CONTINUE; 
     333} 
     334 
     335static mtev_hook_return_t 
    331336histogram_hook_special_impl(void *closure, noit_check_t *check, stats_t *stats, 
    332337                            const char *metric_name, metric_type_t type, const char *v, 
    333                             noit_boolean success) { 
     338                            mtev_boolean success) { 
    334339  void *vht; 
    335340  histotier *ht; 
    336   noit_hash_table *config, *metrics; 
     341  mtev_hash_table *config, *metrics; 
    337342  const char *track = ""; 
    338343 
    339   if(success) return NOIT_HOOK_CONTINUE; 
     344  if(success) return MTEV_HOOK_CONTINUE; 
    340345 
    341346  config = noit_check_get_module_config(check, histogram_module_id); 
    342   if(!config || noit_hash_size(config) == 0) return NOIT_HOOK_CONTINUE; 
    343   noit_hash_retr_str(config, metric_name, strlen(metric_name), &track); 
     347  if(!config || mtev_hash_size(config) == 0) return MTEV_HOOK_CONTINUE; 
     348  mtev_hash_retr_str(config, metric_name, strlen(metric_name), &track); 
    344349  if(!track || strcmp(track, "add")) 
    345     return NOIT_HOOK_CONTINUE; 
     350    return MTEV_HOOK_CONTINUE; 
    346351 
    347352  metrics = noit_check_get_module_metadata(check, histogram_module_id); 
     
    351356                                   metrics, free_hash_o_histotier); 
    352357  } 
    353   if(!noit_hash_retrieve(metrics, metric_name, strlen(metric_name), 
     358  if(!mtev_hash_retrieve(metrics, metric_name, strlen(metric_name), 
    354359                         &vht)) { 
    355360    ht = calloc(1, sizeof(*ht)); 
    356361    vht = ht; 
    357     noit_hash_store(metrics, strdup(metric_name), strlen(metric_name), 
     362    mtev_hash_store(metrics, strdup(metric_name), strlen(metric_name), 
    358363                    vht); 
    359364  } 
     
    365370    double bucket; 
    366371    u_int64_t cnt; 
    367     if(v[0] != 'H' || v[1] != '[') return NOIT_HOOK_CONTINUE; 
    368     if(NULL == (lhs = strchr(v+2, ']'))) return NOIT_HOOK_CONTINUE; 
     372    if(v[0] != 'H' || v[1] != '[') return MTEV_HOOK_CONTINUE; 
     373    if(NULL == (lhs = strchr(v+2, ']'))) return MTEV_HOOK_CONTINUE; 
    369374    lhs++; 
    370     if(*lhs++ != '=') return NOIT_HOOK_CONTINUE; 
     375    if(*lhs++ != '=') return MTEV_HOOK_CONTINUE; 
    371376    bucket = strtod(v+2, &endptr); 
    372     if(endptr == v+2) return NOIT_HOOK_CONTINUE; 
     377    if(endptr == v+2) return MTEV_HOOK_CONTINUE; 
    373378    cnt = strtoull(lhs, &endptr, 10); 
    374     if(endptr == lhs) return NOIT_HOOK_CONTINUE; 
     379    if(endptr == lhs) return MTEV_HOOK_CONTINUE; 
    375380    update_histotier(ht, time(NULL), check, metric_name, bucket, cnt); 
    376381  } 
    377   return NOIT_HOOK_CONTINUE; 
    378 } 
    379  
    380 static noit_hook_return_t 
    381 _histogram_logger_impl(void *closure, noit_check_t *check, noit_boolean passive) { 
     382  return MTEV_HOOK_CONTINUE; 
     383} 
     384 
     385static mtev_hook_return_t 
     386_histogram_logger_impl(void *closure, noit_check_t *check, mtev_boolean passive) { 
    382387  const char *track = ""; 
    383   noit_hash_table *config; 
     388  mtev_hash_table *config; 
    384389 
    385390  config = noit_check_get_module_config(check, histogram_module_id); 
    386   if(!config || noit_hash_size(config) == 0) return NOIT_HOOK_CONTINUE; 
    387   noit_hash_retr_str(config, "metrics", strlen("metrics"), &track); 
     391  if(!config || mtev_hash_size(config) == 0) return MTEV_HOOK_CONTINUE; 
     392  mtev_hash_retr_str(config, "metrics", strlen("metrics"), &track); 
    388393  if(!track || strcmp(track, "replace")) 
    389     return NOIT_HOOK_CONTINUE; 
     394    return MTEV_HOOK_CONTINUE; 
    390395  /* If we're replacing other metrics, then we prevent logging */ 
    391   if(strcmp(track, "replace") == 0) return NOIT_HOOK_DONE; 
    392   return NOIT_HOOK_CONTINUE; 
    393 } 
    394 static noit_hook_return_t 
     396  if(strcmp(track, "replace") == 0) return MTEV_HOOK_DONE; 
     397  return MTEV_HOOK_CONTINUE; 
     398} 
     399static mtev_hook_return_t 
    395400histogram_logger(void *closure, noit_check_t *check) { 
    396   return _histogram_logger_impl(closure, check, noit_false); 
    397 } 
    398 static noit_hook_return_t 
     401  return _histogram_logger_impl(closure, check, mtev_false); 
     402} 
     403static mtev_hook_return_t 
    399404histogram_logger_passive(void *closure, noit_check_t *check) { 
    400   return _histogram_logger_impl(closure, check, noit_true); 
    401 } 
    402 static void 
    403 heartbeat_all_metrics(noit_check_t *check, noit_hash_table *metrics) { 
    404   noit_hash_iter iter = NOIT_HASH_ITER_ZERO; 
     405  return _histogram_logger_impl(closure, check, mtev_true); 
     406} 
     407static void 
     408heartbeat_all_metrics(noit_check_t *check, mtev_hash_table *metrics) { 
     409  mtev_hash_iter iter = MTEV_HASH_ITER_ZERO; 
    405410  const char *k; 
    406411  int klen; 
    407412  void *data; 
    408413  u_int64_t s = time(NULL); 
    409   while(noit_hash_next(metrics, &iter, &k, &klen, &data)) { 
     414  while(mtev_hash_next(metrics, &iter, &k, &klen, &data)) { 
    410415    histotier *ht = data; 
    411416    update_histotier(ht, s, check, k, 0, 0); 
    412417  } 
    413418} 
    414 static noit_hook_return_t 
     419static mtev_hook_return_t 
    415420histogram_hb_hook_impl(void *closure, noit_module_t *self, 
    416421                       noit_check_t *check, noit_check_t *cause) { 
     
    419424   */ 
    420425  noit_check_t *metrics_source = check; 
    421   noit_hash_table *metrics; 
     426  mtev_hash_table *metrics; 
    422427#define NEED_PARENT (NP_TRANSIENT | NP_PASSIVE_COLLECTION) 
    423428 
     
    428433  if((check->flags & NEED_PARENT) == NEED_PARENT) { 
    429434    metrics_source = noit_poller_lookup(check->checkid); 
    430     if(metrics_source == NULL) return NOIT_HOOK_CONTINUE; 
     435    if(metrics_source == NULL) return MTEV_HOOK_CONTINUE; 
    431436  } 
    432437  /* quick disqualifictaion */ 
    433438  metrics = noit_check_get_module_metadata(metrics_source, histogram_module_id); 
    434   if(!metrics || noit_hash_size(metrics) == 0) return NOIT_HOOK_CONTINUE; 
     439  if(!metrics || mtev_hash_size(metrics) == 0) return MTEV_HOOK_CONTINUE; 
    435440  heartbeat_all_metrics(check, metrics); 
    436   return NOIT_HOOK_CONTINUE; 
     441  return MTEV_HOOK_CONTINUE; 
    437442} 
    438443static int 
    439 histogram_init(noit_dso_generic_t *self) { 
     444histogram_init(mtev_dso_generic_t *self) { 
    440445  check_stats_set_metric_hook_register("histogram", histogram_hook_impl, NULL); 
    441446  check_stats_set_metric_coerce_hook_register("histogram", histogram_hook_special_impl, NULL); 
     
    446451} 
    447452 
    448 noit_dso_generic_t histogram = { 
     453mtev_dso_generic_t histogram = { 
    449454  { 
    450     NOIT_GENERIC_MAGIC, 
    451     NOIT_GENERIC_ABI_VERSION, 
     455    MTEV_GENERIC_MAGIC, 
     456    MTEV_GENERIC_ABI_VERSION, 
    452457    "histogram", 
    453458    "Passive histogram support for metrics collection", 
  • src/modules/histogram_impl.c

    r982a459 r304ec80  
    11/* 
    2  * Copyright (c) 2012-2015, Circonus, Inc. 
    3  * All rights reserved. 
     2 * Copyright (c) 2012-2015, Circonus, Inc. All rights reserved. 
    43 * 
    54 * Redistribution and use in source and binary forms, with or without 
     
    3029 */ 
    3130 
    32 #include "noit_defines.h" 
    33 #include "utils/noit_log.h" 
     31#include <mtev_defines.h> 
     32 
     33#include <mtev_log.h> 
     34 
    3435#include <errno.h> 
    3536#include <assert.h> 
     
    301302      u_int64_t double_pun = 0; 
    302303      memcpy(&double_pun, &d_copy, sizeof(d_copy)); 
    303       noitL(noit_error, "double_to_hist_bucket(%f / %llx) -> %u.%u\n", 
     304      mtevL(mtev_error, "double_to_hist_bucket(%f / %llx) -> %u.%u\n", 
    304305            d_copy, (unsigned long long)double_pun, hb.val, hb.exp); 
    305306      hb.val = (int8_t)0xff; 
  • src/modules/histogram_impl.h

    r982a459 r304ec80  
    11/* 
    2  * Copyright (c) 2012-2015, Circonus, Inc. 
    3  * All rights reserved. 
     2 * Copyright (c) 2012-2015, Circonus, Inc. All rights reserved. 
    43 * 
    54 * Redistribution and use in source and binary forms, with or without 
  • src/modules/httptrap.c

    rc80029a r304ec80  
    22 * Copyright (c) 2011, OmniTI Computer Consulting, Inc. 
    33 * All rights reserved. 
     4 * Copyright (c) 2011-2015, Circonus, Inc. All rights reserved. 
    45 * 
    56 * Redistribution and use in source and binary forms, with or without 
     
    3031 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 
    3132 
    32 #include "noit_defines.h" 
     33#include <mtev_defines.h> 
    3334 
    3435#include <stdio.h> 
     
    3839#include <math.h> 
    3940#include <ctype.h> 
     41#include <yajl/yajl_parse.h> 
     42 
     43#include <mtev_rest.h> 
     44#include <mtev_hash.h> 
    4045 
    4146#include "noit_module.h" 
    4247#include "noit_check.h" 
    4348#include "noit_check_tools.h" 
    44 #include "noit_rest.h" 
    45 #include "yajl-lib/yajl_parse.h" 
    46 #include "utils/noit_log.h" 
    47 #include "utils/noit_hash.h" 
     49#include "noit_mtev_bridge.h" 
    4850 
    4951#define DEFAULT_HTTPTRAP_DELIMITER '`' 
    5052#define MAX_DEPTH 32 
    5153 
    52 static noit_log_stream_t nlerr = NULL; 
    53 static noit_log_stream_t nldeb = NULL; 
     54static mtev_log_stream_t nlerr = NULL; 
     55static mtev_log_stream_t nldeb = NULL; 
    5456 
    5557typedef struct _mod_config { 
    56   noit_hash_table *options; 
    57   noit_boolean asynch_metrics; 
     58  mtev_hash_table *options; 
     59  mtev_boolean asynch_metrics; 
    5860} httptrap_mod_config_t; 
    5961 
     
    8385  struct value_list *last_value; 
    8486  int cnt; 
    85   noit_boolean immediate; 
     87  mtev_boolean immediate; 
    8688}; 
    8789 
     
    9395} while(0) 
    9496 
    95 static noit_boolean 
    96 noit_httptrap_check_aynsch(noit_module_t *self, 
     97static mtev_boolean 
     98mtev_httptrap_check_aynsch(noit_module_t *self, 
    9799                           noit_check_t *check) { 
    98100  const char *config_val; 
    99101  httptrap_mod_config_t *conf; 
    100   if(!self) return noit_true; 
     102  if(!self) return mtev_true; 
    101103  conf = noit_module_get_userdata(self); 
    102   if(!conf) return noit_true; 
    103   noit_boolean is_asynch = conf->asynch_metrics; 
    104   if(noit_hash_retr_str(check->config, 
     104  if(!conf) return mtev_true; 
     105  mtev_boolean is_asynch = conf->asynch_metrics; 
     106  if(mtev_hash_retr_str(check->config, 
    105107                        "asynch_metrics", strlen("asynch_metrics"), 
    106108                        (const char **)&config_val)) { 
    107109    if(!strcasecmp(config_val, "false") || !strcasecmp(config_val, "off")) 
    108       is_asynch = noit_false; 
     110      is_asynch = mtev_false; 
    109111    else if(!strcasecmp(config_val, "true") || !strcasecmp(config_val, "on")) 
    110       is_asynch = noit_true; 
     112      is_asynch = mtev_true; 
    111113  } 
    112114 
     
    260262  if(json->saw_complex_type == 0x3) { 
    261263    long double total = 0, cnt = 0; 
    262     noit_boolean use_avg = noit_false; 
     264    mtev_boolean use_avg = mtev_false; 
    263265    for(p=json->last_value;p;p=p->next) { 
    264266      noit_stats_set_metric_coerce(json->check, json->stats, 
     
    271273        total += strtold(p->v, NULL); 
    272274        cnt = cnt + 1; 
    273         use_avg = noit_true; 
     275        use_avg = mtev_true; 
    274276      } 
    275277      json->cnt++; 
     
    373375 
    374376static struct rest_json_payload * 
    375 rest_get_json_upload(noit_http_rest_closure_t *restc, 
     377rest_get_json_upload(mtev_http_rest_closure_t *restc, 
    376378                    int *mask, int *complete) { 
    377379  struct rest_json_payload *rxc; 
    378   noit_http_request *req = noit_http_session_request(restc->http_ctx); 
     380  mtev_http_request *req = mtev_http_session_request(restc->http_ctx); 
    379381  httptrap_closure_t *ccl; 
    380382  int content_length; 
    381383  char buffer[32768]; 
    382384 
    383   content_length = noit_http_request_content_length(req); 
     385  content_length = mtev_http_request_content_length(req); 
    384386  rxc = restc->call_closure; 
    385387  ccl = rxc->check->closure; 
    386   rxc->immediate = noit_httptrap_check_aynsch(ccl->self, rxc->check); 
     388  rxc->immediate = mtev_httptrap_check_aynsch(ccl->self, rxc->check); 
    387389  while(!rxc->complete) { 
    388390    int len; 
    389     len = noit_http_session_req_consume( 
     391    len = mtev_http_session_req_consume( 
    390392            restc->http_ctx, buffer, 
    391393            MIN(content_length - rxc->len, sizeof(buffer)), 
     
    410412      return NULL; 
    411413    } 
    412     content_length = noit_http_request_content_length(req); 
    413     if((noit_http_request_payload_chunked(req) && len == 0) || 
     414    content_length = mtev_http_request_content_length(req); 
     415    if((mtev_http_request_payload_chunked(req) && len == 0) || 
    414416       (rxc->len == content_length)) { 
    415417      rxc->complete = 1; 
     
    429431  if(check->flags & NP_TRANSIENT) return 0; 
    430432 
    431   noit_httptrap_check_aynsch(self, check); 
     433  mtev_httptrap_check_aynsch(self, check); 
    432434  if(!check->closure) { 
    433435    ccl = check->closure = (void *)calloc(1, sizeof(httptrap_closure_t));  
     
    445447             "dur=%d,run=%d,stats=%d", check->stats.inprogress.duration, 
    446448             check->generation, ccl->stats_count); 
    447     noitL(nldeb, "httptrap(%s) [%s]\n", check->target, human_buffer); 
     449    mtevL(nldeb, "httptrap(%s) [%s]\n", check->target, human_buffer); 
    448450 
    449451    // Not sure what to do here 
     
    466468push_payload_at_check(struct rest_json_payload *rxc) { 
    467469  httptrap_closure_t *ccl; 
    468   noit_boolean immediate; 
     470  mtev_boolean immediate; 
    469471  char key[256]; 
    470472 
     
    472474  if (rxc->check->closure == NULL) return 0; 
    473475  ccl = rxc->check->closure; 
    474   immediate = noit_httptrap_check_aynsch(ccl->self,rxc->check); 
     476  immediate = mtev_httptrap_check_aynsch(ccl->self,rxc->check); 
    475477 
    476478  /* do it here */ 
     
    480482 
    481483static int 
    482 rest_httptrap_handler(noit_http_rest_closure_t *restc, 
     484rest_httptrap_handler(mtev_http_rest_closure_t *restc, 
    483485                      int npats, char **pats) { 
    484486  int mask, complete = 0, cnt; 
    485487  struct rest_json_payload *rxc = NULL; 
    486488  const char *error = "internal error", *secret = NULL; 
    487   noit_http_session_ctx *ctx = restc->http_ctx; 
     489  mtev_http_session_ctx *ctx = restc->http_ctx; 
    488490  char json_out[128]; 
    489491  noit_check_t *check; 
     
    509511      goto error; 
    510512    } 
    511     (void)noit_hash_retr_str(check->config, "secret", strlen("secret"), &secret); 
     513    (void)mtev_hash_retr_str(check->config, "secret", strlen("secret"), &secret); 
    512514    if(!secret) secret = ""; 
    513515    if(strcmp(pats[1], secret)) { 
     
    515517      goto error; 
    516518    } 
    517     (void)noit_hash_retr_str(check->config, "delimiter", strlen("delimiter"), &delimiter); 
     519    (void)mtev_hash_retr_str(check->config, "delimiter", strlen("delimiter"), &delimiter); 
    518520    if(delimiter && *delimiter) rxc->delimiter = *delimiter; 
    519521    rxc->check = check; 
     
    536538  /* flip threads */ 
    537539  { 
    538     noit_http_connection *conn = noit_http_session_connection(ctx); 
    539     eventer_t e = noit_http_connection_event(conn); 
     540    mtev_http_connection *conn = mtev_http_session_connection(ctx); 
     541    eventer_t e = mtev_http_connection_event(conn); 
    540542    if(e) { 
    541543      pthread_t tgt = CHOOSE_EVENTER_THREAD_FOR_CHECK(rxc->check); 
     
    555557  cnt = push_payload_at_check(rxc); 
    556558 
    557   noit_http_response_ok(ctx, "application/json"); 
     559  mtev_http_response_ok(ctx, "application/json"); 
    558560  snprintf(json_out, sizeof(json_out), 
    559561           "{ \"stats\": %d }", cnt); 
    560   noit_http_response_append(ctx, json_out, strlen(json_out)); 
    561   noit_http_response_end(ctx); 
     562  mtev_http_response_append(ctx, json_out, strlen(json_out)); 
     563  mtev_http_response_end(ctx); 
    562564  return 0; 
    563565 
    564566 error: 
    565   noit_http_response_server_error(ctx, "application/json"); 
    566   noit_http_response_append(ctx, "{ error: \"", 10); 
     567  mtev_http_response_server_error(ctx, "application/json"); 
     568  mtev_http_response_append(ctx, "{ error: \"", 10); 
    567569  if(rxc && rxc->error) error = rxc->error; 
    568   noit_http_response_append(ctx, error, strlen(error)); 
    569   noit_http_response_append(ctx, "\" }", 3); 
    570   noit_http_response_end(ctx); 
     570  mtev_http_response_append(ctx, error, strlen(error)); 
     571  mtev_http_response_append(ctx, "\" }", 3); 
     572  mtev_http_response_end(ctx); 
    571573  return 0; 
    572574} 
    573575 
    574 static int noit_httptrap_initiate_check(noit_module_t *self, 
     576static int mtev_httptrap_initiate_check(noit_module_t *self, 
    575577                                        noit_check_t *check, 
    576578                                        int once, noit_check_t *cause) { 
     
    585587} 
    586588 
    587 static int noit_httptrap_config(noit_module_t *self, noit_hash_table *options) { 
     589static int mtev_httptrap_config(noit_module_t *self, mtev_hash_table *options) { 
    588590  httptrap_mod_config_t *conf; 
    589591  conf = noit_module_get_userdata(self); 
    590592  if(conf) { 
    591593    if(conf->options) { 
    592       noit_hash_destroy(conf->options, free, free); 
     594      mtev_hash_destroy(conf->options, free, free); 
    593595      free(conf->options); 
    594596    } 
     
    601603} 
    602604 
    603 static int noit_httptrap_onload(noit_image_t *self) { 
    604   if(!nlerr) nlerr = noit_log_stream_find("error/httptrap"); 
    605   if(!nldeb) nldeb = noit_log_stream_find("debug/httptrap"); 
     605static int mtev_httptrap_onload(mtev_image_t *self) { 
     606  if(!nlerr) nlerr = mtev_log_stream_find("error/httptrap"); 
     607  if(!nldeb) nldeb = mtev_log_stream_find("debug/httptrap"); 
    606608  if(!nlerr) nlerr = noit_error; 
    607609  if(!nldeb) nldeb = noit_debug; 
     
    609611} 
    610612 
    611 static int noit_httptrap_init(noit_module_t *self) { 
     613static int mtev_httptrap_init(noit_module_t *self) { 
    612614  const char *config_val; 
    613615  httptrap_mod_config_t *conf; 
    614616  conf = noit_module_get_userdata(self); 
    615617 
    616   conf->asynch_metrics = noit_true; 
    617   if(noit_hash_retr_str(conf->options, 
     618  conf->asynch_metrics = mtev_true; 
     619  if(mtev_hash_retr_str(conf->options, 
    618620                        "asynch_metrics", strlen("asynch_metrics"), 
    619621                        (const char **)&config_val)) { 
    620622    if(!strcasecmp(config_val, "false") || !strcasecmp(config_val, "off")) 
    621       conf->asynch_metrics = noit_false; 
     623      conf->asynch_metrics = mtev_false; 
    622624  } 
    623625 
     
    625627 
    626628  /* register rest handler */ 
    627   noit_http_rest_register("PUT", "/module/httptrap/", 
     629  mtev_http_rest_register("PUT", "/module/httptrap/", 
    628630                          "^(" UUID_REGEX ")/([^/]*).*$", 
    629631                          rest_httptrap_handler); 
    630   noit_http_rest_register("POST", "/module/httptrap/", 
     632  mtev_http_rest_register("POST", "/module/httptrap/", 
    631633                          "^(" UUID_REGEX ")/([^/]*).*$", 
    632634                          rest_httptrap_handler); 
     
    642644    .description = "httptrap collection", 
    643645    .xml_description = httptrap_xml_description, 
    644     .onload = noit_httptrap_onload 
     646    .onload = mtev_httptrap_onload 
    645647  }, 
    646   noit_httptrap_config, 
    647   noit_httptrap_init, 
    648   noit_httptrap_initiate_check, 
     648  mtev_httptrap_config, 
     649  mtev_httptrap_init, 
     650  mtev_httptrap_initiate_check, 
    649651  NULL 
    650652}; 
  • src/modules/ip_acl.c

    r1174acf r304ec80  
    11/* 
    2  * Copyright (c) 2011, Circonus, Inc. 
    3  * All rights reserved. 
     2 * Copyright (c) 2011,2015, Circonus, Inc. All rights reserved. 
    43 * 
    54 * Redistribution and use in source and binary forms, with or without 
     
    3130 */ 
    3231 
    33 #include "noit_defines.h" 
     32#include <mtev_defines.h> 
     33 
     34#include <assert.h> 
     35 
     36#include <mtev_hash.h> 
     37#include <mtev_btrie.h> 
     38 
     39#include "noit_mtev_bridge.h" 
    3440#include "noit_module.h" 
    3541#include "noit_check.h" 
    3642#include "noit_check_tools.h" 
    37 #include "utils/noit_log.h" 
    38 #include "utils/noit_hash.h" 
    39 #include "utils/noit_btrie.h" 
    4043#include "ip_acl.xmlh" 
    41 #include <assert.h> 
    4244 
    4345#define DENY_PTR (void *)-1 
     
    4648static int ip_acl_module_id = -1; 
    4749 
    48 static noit_hash_table acls = NOIT_HASH_EMPTY; 
     50static mtev_hash_table acls = MTEV_HASH_EMPTY; 
    4951 
    5052static void 
     
    5254  btrie *acl = vb; 
    5355  if(acl) { 
    54     noit_drop_tree(acl, NULL); 
     56    mtev_drop_tree(acl, NULL); 
    5557    free(acl); 
    5658  } 
    5759} 
    5860static int 
    59 ip_acl_onload(noit_image_t *self) { 
     61ip_acl_onload(mtev_image_t *self) { 
    6062  int i, cnt; 
    61   noit_conf_section_t *acl_c; 
     63  mtev_conf_section_t *acl_c; 
    6264  ip_acl_module_id = noit_check_register_module("ip_acl"); 
    6365  if(ip_acl_module_id < 0) return -1; 
    6466 
    65   acl_c = noit_conf_get_sections(NULL, "/noit/acls//acl", &cnt); 
     67  acl_c = mtev_conf_get_sections(NULL, "/noit/acls//acl", &cnt); 
    6668  if(acl_c) { 
    6769    for(i=0; i<cnt; i++) { 
    6870      char *name; 
    6971      int j, rcnt, arcnt = 0; 
    70       noit_conf_section_t *rule_c; 
    71       if(noit_conf_get_string(acl_c[i], "@name", &name)) { 
    72         rule_c = noit_conf_get_sections(acl_c[i], "rule", &rcnt); 
     72      mtev_conf_section_t *rule_c; 
     73      if(mtev_conf_get_string(acl_c[i], "@name", &name)) { 
     74        rule_c = mtev_conf_get_sections(acl_c[i], "rule", &rcnt); 
    7375        if(rule_c) { 
    7476          btrie *acl = calloc(1, sizeof(*acl)); 
     
    8284            } a; 
    8385 
    84             noit_conf_get_stringbuf(rule_c[j], "self::node()", target, sizeof(target)); 
     86            mtev_conf_get_stringbuf(rule_c[j], "self::node()", target, sizeof(target)); 
    8587            if(NULL != (cp = strchr(target, '/'))) { 
    8688              *cp++ = '\0'; 
    8789              mask = atoi(cp); 
    8890            } 
    89             if(!noit_conf_get_stringbuf(rule_c[j], "@type", dirstr, sizeof(dirstr)) || 
     91            if(!mtev_conf_get_stringbuf(rule_c[j], "@type", dirstr, sizeof(dirstr)) || 
    9092               (strcmp(dirstr, "deny") && strcmp(dirstr, "allow"))) { 
    91               noitL(noit_error, "Unknown acl rule type \"%s\" in acl \"%s\"\n", 
     93              mtevL(noit_error, "Unknown acl rule type \"%s\" in acl \"%s\"\n", 
    9294                    dirstr, name); 
    9395            } 
    9496            else if(inet_pton(AF_INET, target, &a) == 1) { 
    9597              if(mask == -1) mask = 32; 
    96               noit_add_route_ipv4(acl, &a.addr4, mask, strcmp(dirstr, "allow") ? DENY_PTR : ALLOW_PTR); 
     98              mtev_add_route_ipv4(acl, &a.addr4, mask, strcmp(dirstr, "allow") ? DENY_PTR : ALLOW_PTR); 
    9799              arcnt++; 
    98100            } 
    99101            else if(inet_pton(AF_INET6, target, &a) == 1) { 
    100102              if(mask == -1) mask = 128; 
    101               noit_add_route_ipv6(acl, &a.addr6, mask, strcmp(dirstr, "allow") ? DENY_PTR : ALLOW_PTR); 
     103              mtev_add_route_ipv6(acl, &a.addr6, mask, strcmp(dirstr, "allow") ? DENY_PTR : ALLOW_PTR); 
    102104              arcnt++; 
    103105            } 
    104106          } 
    105           noitL(noit_debug, "ACL %s/%p -> %d/%d rules\n", name, acl, arcnt, rcnt); 
    106           noit_hash_replace(&acls, name, strlen(name), acl, free, free_btrie); 
     107          mtevL(noit_debug, "ACL %s/%p -> %d/%d rules\n", name, acl, arcnt, rcnt); 
     108          mtev_hash_replace(&acls, name, strlen(name), acl, free, free_btrie); 
    107109          free(rule_c); 
    108110        } 
     
    115117 
    116118static int 
    117 ip_acl_config(noit_dso_generic_t *self, noit_hash_table *o) { 
     119ip_acl_config(mtev_dso_generic_t *self, mtev_hash_table *o) { 
    118120  return 0; 
    119121} 
    120122 
    121 static noit_hook_return_t 
     123static mtev_hook_return_t 
    122124ip_acl_hook_impl(void *closure, noit_module_t *self, 
    123125                 noit_check_t *check, noit_check_t *cause) { 
    124126  char deny_msg[128]; 
    125   noit_hash_table *config; 
    126   noit_hash_iter iter = NOIT_HASH_ITER_ZERO; 
     127  mtev_hash_table *config; 
     128  mtev_hash_iter iter = MTEV_HASH_ITER_ZERO; 
    127129  const char *k = NULL; 
    128130  int klen; 
    129131  void *data; 
    130132  config = noit_check_get_module_config(check, ip_acl_module_id); 
    131   if(!config || noit_hash_size(config) == 0) return NOIT_HOOK_CONTINUE; 
    132   while(noit_hash_next(config, &iter, &k, &klen, &data)) { 
     133  if(!config || mtev_hash_size(config) == 0) return MTEV_HOOK_CONTINUE; 
     134  while(mtev_hash_next(config, &iter, &k, &klen, &data)) { 
    133135    if(k) { 
    134136      void *dir = NULL; 
    135137      unsigned char mask; 
    136       if(noit_hash_retrieve(&acls, k, strlen(k), &data)) { 
     138      if(mtev_hash_retrieve(&acls, k, strlen(k), &data)) { 
    137139        btrie *acl = data; 
    138140        if(check->target_family == AF_INET) { 
    139           dir = noit_find_bpm_route_ipv4(acl, &check->target_addr.addr, &mask); 
     141          dir = mtev_find_bpm_route_ipv4(acl, &check->target_addr.addr, &mask); 
    140142          if(dir == DENY_PTR) goto prevent; 
    141           else if(dir == ALLOW_PTR) return NOIT_HOOK_CONTINUE; 
     143          else if(dir == ALLOW_PTR) return MTEV_HOOK_CONTINUE; 
    142144        } 
    143145        else if(check->target_family == AF_INET6) { 
    144           dir = noit_find_bpm_route_ipv6(acl, &check->target_addr.addr6, &mask); 
     146          dir = mtev_find_bpm_route_ipv6(acl, &check->target_addr.addr6, &mask); 
    145147          if(dir == DENY_PTR) goto prevent; 
    146           else if(dir == ALLOW_PTR) return NOIT_HOOK_CONTINUE; 
     148          else if(dir == ALLOW_PTR) return MTEV_HOOK_CONTINUE; 
    147149        } 
    148150      } 
    149151    } 
    150152  } 
    151   return NOIT_HOOK_CONTINUE; 
     153  return MTEV_HOOK_CONTINUE; 
    152154 
    153155 prevent: 
     
    160162  noit_check_set_stats(check, &check->stats.inprogress); 
    161163  noit_check_stats_clear(check, &check->stats.inprogress); 
    162   return NOIT_HOOK_DONE; 
     164  return MTEV_HOOK_DONE; 
    163165} 
    164166static int 
    165 ip_acl_init(noit_dso_generic_t *self) { 
     167ip_acl_init(mtev_dso_generic_t *self) { 
    166168  check_preflight_hook_register("ip_acl", ip_acl_hook_impl, NULL); 
    167169  return 0; 
    168170} 
    169171 
    170 noit_dso_generic_t ip_acl = { 
     172mtev_dso_generic_t ip_acl = { 
    171173  { 
    172     .magic = NOIT_GENERIC_MAGIC, 
    173     .version = NOIT_GENERIC_ABI_VERSION, 
     174    .magic = MTEV_GENERIC_MAGIC, 
     175    .version = MTEV_GENERIC_ABI_VERSION, 
    174176    .name = "ip_acl", 
    175177    .description = "IP Access Controls for Checks", 
  • src/modules/librabbitmq/amqp_connection.c

    r06c58af r304ec80  
    55#include <stdint.h> 
    66#include <errno.h> 
     7#include <mtev_log.h> 
    78 
    89#include <unistd.h> 
     
    1213#include "amqp_framing.h" 
    1314#include "amqp_private.h" 
    14 #include "utils/noit_log.h" 
    1515 
    1616#include <assert.h> 
     
    387387                             payload_len + (HEADER_SIZE + FOOTER_SIZE)); 
    388388      if (err < 0) { 
    389         noitL(noit_error, "Error writing %d bytes in amqp_send_frame (separate body: false)\n",  
     389        mtevL(mtev_error, "Error writing %d bytes in amqp_send_frame (separate body: false)\n",  
    390390              payload_len + (HEADER_SIZE + FOOTER_SIZE)); 
    391391        return err; 
     
    396396      err = eintr_safe_write(state->sockfd, state->outbound_buffer.bytes, HEADER_SIZE); 
    397397      if (err < 0) { 
    398         noitL(noit_error, "Error writing header in amqp_send_frame, size %d\n", HEADER_SIZE); 
     398        mtevL(mtev_error, "Error writing header in amqp_send_frame, size %d\n", HEADER_SIZE); 
    399399        return err; 
    400400      } 
    401401      err = eintr_safe_write(state->sockfd, encoded.bytes, payload_len); 
    402402      if (err < 0) { 
    403         noitL(noit_error, "Error writing body in amqp_send_frame, size %d\n", payload_len); 
     403        mtevL(mtev_error, "Error writing body in amqp_send_frame, size %d\n", payload_len); 
    404404        return err; 
    405405      } 
    406406      err = eintr_safe_write(state->sockfd, &frame_end_byte, FOOTER_SIZE); 
    407407      if (err < 0) { 
    408         noitL(noit_error, "Error writing footer in amqp_send_frame, size %d\n", FOOTER_SIZE); 
     408        mtevL(mtev_error, "Error writing footer in amqp_send_frame, size %d\n", FOOTER_SIZE); 
    409409        return err; 
    410410      } 
  • src/modules/librabbitmq/amqp_socket.c

    r06c58af r304ec80  
    88#include <fcntl.h> 
    99#include <poll.h> 
     10#include <mtev_log.h> 
    1011 
    1112#include "amqp.h" 
    1213#include "amqp_framing.h" 
    1314#include "amqp_private.h" 
    14 #include "utils/noit_log.h" 
    1515 
    1616#include <eventer/eventer.h> 
     
    105105  int ret = eintr_safe_write(state->sockfd, header(), 8); 
    106106  if (ret < 0) { 
    107     noitL(noit_error, "Failed to write header in amqp_send_header, size 8\n"); 
     107    mtevL(mtev_error, "Failed to write header in amqp_send_header, size 8\n"); 
    108108  } 
    109109  return ret; 
     
    190190                  state->sock_inbound_buffer.len); 
    191191    if (result < 0) { 
    192       noitL(noit_error, "Failed to read message in wait_frame_inner, size %d\n", state->sock_inbound_buffer.len); 
     192      mtevL(mtev_error, "Failed to read message in wait_frame_inner, size %d\n", state->sock_inbound_buffer.len); 
    193193      return -errno; 
    194194    } 
  • src/modules/lua.c

    r1174acf r304ec80  
    22 * Copyright (c) 2007-2010, OmniTI Computer Consulting, Inc. 
    33 * All rights reserved. 
     4 * Copyright (c) 2010-2015, Circonus, Inc. All rights reserved. 
    45 * 
    56 * Redistribution and use in source and binary forms, with or without 
     
    3132 */ 
    3233 
    33 #include "noit_defines.h" 
    34  
    35 #include "noit_conf.h" 
    36 #include "noit_dso.h" 
    37 #include "noit_module.h" 
    38 #include "noit_check.h" 
    39 #include "noit_check_tools.h" 
    40 #include "utils/noit_log.h" 
    41 #include "lua_noit.h" 
     34#include <mtev_defines.h> 
    4235 
    4336#include <unistd.h> 
     
    4740#include <assert.h> 
    4841 
     42#include <mtev_conf.h> 
     43#include <mtev_dso.h> 
     44#include <mtev_log.h> 
     45 
     46#include "noit_config.h" 
     47#include "noit_module.h" 
     48#include "noit_check.h" 
     49#include "noit_check_tools.h" 
     50#include "noit_mtev_bridge.h" 
     51 
     52#include "lua_noit.h" 
     53 
    4954static pthread_t loader_main_thread; 
    50 static noit_log_stream_t nlerr = NULL; 
    51 static noit_log_stream_t nldeb = NULL; 
    52 static noit_hash_table noit_lua_states = NOIT_HASH_EMPTY; 
     55static mtev_log_stream_t nlerr = NULL; 
     56static mtev_log_stream_t nldeb = NULL; 
     57static mtev_hash_table noit_lua_states = MTEV_HASH_EMPTY; 
    5358static pthread_mutex_t noit_lua_states_lock = PTHREAD_MUTEX_INITIALIZER; 
    54 static noit_hash_table noit_coros = NOIT_HASH_EMPTY; 
     59static mtev_hash_table noit_coros = MTEV_HASH_EMPTY; 
    5560static pthread_mutex_t coro_lock = PTHREAD_MUTEX_INITIALIZER; 
    5661 
     
    6267  struct loader_conf *c; 
    6368  char *object; 
    64   noit_hash_table *options; 
     69  mtev_hash_table *options; 
    6570  pthread_key_t key; 
    6671}; 
     
    7277  int initialized_return; 
    7378}; 
    74 static struct module_tls_conf *__get_module_tls_conf(noit_image_t *img) { 
     79static struct module_tls_conf *__get_module_tls_conf(mtev_image_t *img) { 
    7580  struct module_conf *mc; 
    7681  struct module_tls_conf *mtlsc; 
    77   mc = noit_image_get_userdata(img); 
     82  mc = mtev_image_get_userdata(img); 
    7883  mtlsc = pthread_getspecific(mc->key); 
    7984  if(mtlsc == NULL) { 
     
    8388  return mtlsc; 
    8489} 
    85 static struct loader_conf *__get_loader_conf(noit_dso_loader_t *self) { 
     90static struct loader_conf *__get_loader_conf(mtev_dso_loader_t *self) { 
    8691  struct loader_conf *c; 
    87   c = noit_image_get_userdata(&self->hdr); 
     92  c = mtev_image_get_userdata(&self->hdr); 
    8893  if(!c) { 
    8994    c = calloc(1, sizeof(*c)); 
    9095    pthread_key_create(&c->key, NULL); 
    91     noit_image_set_userdata(&self->hdr, c); 
     96    mtev_image_set_userdata(&self->hdr, c); 
    9297  } 
    9398  return c; 
    9499} 
    95100static void 
    96 noit_lua_loader_set_directory(noit_dso_loader_t *self, const char *dir) { 
     101noit_lua_loader_set_directory(mtev_dso_loader_t *self, const char *dir) { 
    97102  struct loader_conf *c = __get_loader_conf(self); 
    98103  if(c->script_dir) free(c->script_dir); 
     
    100105} 
    101106static const char * 
    102 noit_lua_loader_get_directory(noit_dso_loader_t *self) { 
     107noit_lua_loader_get_directory(mtev_dso_loader_t *self) { 
    103108  struct loader_conf *c = __get_loader_conf(self); 
    104109  return c->script_dir; 
     
    111116  lua_pop(ci->lmc->lua_state, 1); 
    112117  lua_gc(ci->lmc->lua_state, LUA_GCCOLLECT, 0); 
    113   noitL(nldeb, "coro_store <- %p\n", ci->coro_state); 
     118  mtevL(nldeb, "coro_store <- %p\n", ci->coro_state); 
    114119  pthread_mutex_lock(&coro_lock); 
    115   assert(noit_hash_delete(&noit_coros, 
     120  assert(mtev_hash_delete(&noit_coros, 
    116121                          (const char *)&ci->coro_state, sizeof(ci->coro_state), 
    117122                          NULL, NULL)); 
     
    123128  lua_getglobal(L, "noit_internal_lmc"); 
    124129  ri->lmc = lua_touserdata(L, lua_gettop(L)); 
    125   noitL(nldeb, "coro_store -> %p\n", ri->coro_state); 
     130  mtevL(nldeb, "coro_store -> %p\n", ri->coro_state); 
    126131  pthread_mutex_lock(&coro_lock); 
    127   noit_hash_store(&noit_coros, 
     132  mtev_hash_store(&noit_coros, 
    128133                  (const char *)&ri->coro_state, sizeof(ri->coro_state), 
    129134                  ri);  
     
    131136} 
    132137static void 
    133 describe_lua_context(noit_console_closure_t ncct, 
     138describe_lua_context(mtev_console_closure_t ncct, 
    134139                     noit_lua_resume_info_t *ri) { 
    135140  switch(ri->context_magic) { 
     
    163168struct lua_reporter { 
    164169  pthread_mutex_t lock; 
    165   noit_console_closure_t ncct; 
    166   noit_atomic32_t outstanding; 
     170  mtev_console_closure_t ncct; 
     171  mtev_atomic32_t outstanding; 
    167172}; 
    168173 
     
    171176                                 struct timeval *now) { 
    172177  struct lua_reporter *reporter = closure; 
    173   noit_console_closure_t ncct = reporter->ncct; 
    174   noit_hash_iter zero = NOIT_HASH_ITER_ZERO, iter; 
     178  mtev_console_closure_t ncct = reporter->ncct; 
     179  mtev_hash_iter zero = MTEV_HASH_ITER_ZERO, iter; 
    175180  const char *key; 
    176181  int klen; 
     
    184189  memcpy(&iter, &zero, sizeof(zero)); 
    185190  pthread_mutex_lock(&noit_lua_states_lock); 
    186   while(noit_hash_next(&noit_lua_states, &iter, &key, &klen, &vri)) { 
     191  while(mtev_hash_next(&noit_lua_states, &iter, &key, &klen, &vri)) { 
    187192    lua_State **Lptr = (lua_State **)key; 
    188193    pthread_t tgt = (pthread_t)(vpsized_int)vri; 
     
    196201  memcpy(&iter, &zero, sizeof(zero)); 
    197202  pthread_mutex_lock(&coro_lock); 
    198   while(noit_hash_next(&noit_coros, &iter, &key, &klen, &vri)) { 
     203  while(mtev_hash_next(&noit_coros, &iter, &key, &klen, &vri)) { 
    199204    noit_lua_resume_info_t *ri; 
    200205    int level = 1; 
     
    236241  } 
    237242  pthread_mutex_unlock(&coro_lock); 
    238   noit_atomic_dec32(&reporter->outstanding); 
     243  mtev_atomic_dec32(&reporter->outstanding); 
    239244  pthread_mutex_unlock(&reporter->lock); 
    240245  return 0; 
    241246} 
    242247static int 
    243 noit_console_show_lua(noit_console_closure_t ncct, 
     248noit_console_show_lua(mtev_console_closure_t ncct, 
    244249                      int argc, char **argv, 
    245                       noit_console_state_t *dstate, 
     250                      mtev_console_state_t *dstate, 
    246251                      void *closure) { 
    247252  int i = 0; 
     
    267272      e->callback = noit_console_lua_thread_reporter; 
    268273      e->closure = &crutch; 
    269       noit_atomic_inc32(&crutch.outstanding); 
     274      mtev_atomic_inc32(&crutch.outstanding); 
    270275      eventer_add(e); 
    271276    } while(!pthread_equal(first, tgt)); 
     
    283288static void 
    284289register_console_lua_commands() { 
    285   noit_console_state_t *tl; 
     290  mtev_console_state_t *tl; 
    286291  cmd_info_t *showcmd; 
    287292 
    288   tl = noit_console_state_initial(); 
    289   showcmd = noit_console_state_get_cmd(tl, "show"); 
     293  tl = mtev_console_state_initial(); 
     294  showcmd = mtev_console_state_get_cmd(tl, "show"); 
    290295  assert(showcmd && showcmd->dstate); 
    291   noit_console_state_add_cmd(showcmd->dstate, 
     296  mtev_console_state_add_cmd(showcmd->dstate, 
    292297    NCSCMD("lua", noit_console_show_lua, NULL, NULL, NULL)); 
    293298} 
     
    299304  void *v = NULL; 
    300305  pthread_mutex_lock(&coro_lock); 
    301   if(noit_hash_retrieve(&noit_coros, (const char *)&L, sizeof(L), &v)) { 
     306  if(mtev_hash_retrieve(&noit_coros, (const char *)&L, sizeof(L), &v)) { 
    302307    pthread_mutex_unlock(&coro_lock); 
    303308    ri = v; 
     
    311316  ri->lmc = lua_touserdata(L, lua_gettop(L)); 
    312317  lua_pop(L, 1); 
    313   noitL(nldeb, "coro_store -> %p\n", ri->coro_state); 
     318  mtevL(nldeb, "coro_store -> %p\n", ri->coro_state); 
    314319  lua_getglobal(L, "noit_coros"); 
    315320  lua_pushthread(L); 
    316321  ri->coro_state_ref = luaL_ref(L, -2); 
    317322  lua_pop(L, 1); /* pops noit_coros */ 
    318   noit_hash_store(&noit_coros, 
     323  mtev_hash_store(&noit_coros, 
    319324                  (const char *)&ri->coro_state, sizeof(ri->coro_state), 
    320325                  ri); 
     
    327332} 
    328333 
    329 static lua_module_closure_t *lmc_tls_get(noit_image_t *mod) { 
     334static lua_module_closure_t *lmc_tls_get(mtev_image_t *mod) { 
    330335  lua_module_closure_t *lmc; 
    331336  struct loader_conf *c; 
    332   if(mod->magic == NOIT_LOADER_MAGIC) { 
    333     c = noit_image_get_userdata(mod); 
     337  if(mod->magic == MTEV_LOADER_MAGIC) { 
     338    c = mtev_image_get_userdata(mod); 
    334339  } 
    335340  else { 
    336341    struct module_conf *mc; 
    337     mc = noit_image_get_userdata(mod); 
     342    mc = mtev_image_get_userdata(mod); 
    338343    c = mc->c; 
    339344  } 
     
    345350  struct module_conf *mc; 
    346351  struct module_tls_conf *mtlsc; 
    347   mc = noit_image_get_userdata(&mod->hdr); 
     352  mc = mtev_image_get_userdata(&mod->hdr); 
    348353  if(obj) *obj = mc->object; 
    349354  lmc = pthread_getspecific(mc->c->key); 
     
    354359    lmc->resume = noit_lua_check_resume; 
    355360    pthread_setspecific(mc->c->key, lmc); 
    356     noitL(nldeb, "lua_state[%s]: new state\n", mod->hdr.name); 
     361    mtevL(nldeb, "lua_state[%s]: new state\n", mod->hdr.name); 
    357362    lmc->lua_state = noit_lua_open(mod->hdr.name, lmc, mc->c->script_dir); 
    358363  } 
     
    364369    mtlsc->loaded = 1; 
    365370  } 
    366   noitL(nldeb, "lua_state[%s]: %p\n", mod->hdr.name, lmc->lua_state); 
     371  mtevL(nldeb, "lua_state[%s]: %p\n", mod->hdr.name, lmc->lua_state); 
    367372  return lmc; 
    368373} 
     
    372377  eventer_t *value = ev; 
    373378  eventer_t removed, e = *value; 
    374   noitL(nldeb, "lua check cleanup: dropping (%p)->fd (%d)\n", e, e->fd); 
     379  mtevL(nldeb, "lua check cleanup: dropping (%p)->fd (%d)\n", e, e->fd); 
    375380  removed = eventer_remove(e); 
    376   noitL(nldeb, "    remove from eventer system %s\n", 
     381  mtevL(nldeb, "    remove from eventer system %s\n", 
    377382        removed ? "succeeded" : "failed"); 
    378383  if(e->mask & (EVENTER_READ|EVENTER_WRITE|EVENTER_EXCEPTION)) { 
    379     noitL(nldeb, "    closing down fd %d\n", e->fd); 
     384    mtevL(nldeb, "    closing down fd %d\n", e->fd); 
    380385    e->opset->close(e->fd, &mask, e); 
    381386  } 
     
    395400  if(!ci->events) { 
    396401    ci->events = calloc(1, sizeof(*ci->events)); 
    397     noit_hash_init(ci->events); 
    398   } 
    399   assert(noit_hash_store(ci->events, (const char *)eptr, sizeof(*eptr), eptr)); 
     402    mtev_hash_init(ci->events); 
     403  } 
     404  assert(mtev_hash_store(ci->events, (const char *)eptr, sizeof(*eptr), eptr)); 
    400405} 
    401406void 
     
    403408                                int tofree) { 
    404409  assert(ci->events); 
    405   assert(noit_hash_delete(ci->events, (const char *)&e, sizeof(e), 
     410  assert(mtev_hash_delete(ci->events, (const char *)&e, sizeof(e), 
    406411                          NULL, tofree ? noit_event_dispose : free)); 
    407412} 
     
    409414noit_lua_resume_clean_events(noit_lua_resume_info_t *ci) { 
    410415  if(ci->events == NULL) return; 
    411   noit_hash_destroy(ci->events, NULL, noit_event_dispose); 
     416  mtev_hash_destroy(ci->events, NULL, noit_event_dispose); 
    412417  free(ci->events); 
    413418  ci->events = NULL; 
     
    431436  } 
    432437} 
    433 noit_hash_table * 
     438mtev_hash_table * 
    434439noit_lua_table_to_hash(lua_State *L, int idx) { 
    435   noit_hash_table *t; 
     440  mtev_hash_table *t; 
    436441  if(lua_gettop(L) < idx || !lua_istable(L,idx)) 
    437442    luaL_error(L, "table_to_hash: not a table"); 
     
    444449    key = lua_tolstring(L, -2, &klen); 
    445450    value = lua_tostring(L, -1); 
    446     noit_hash_store(t, key, klen, (void *)value); 
     451    mtev_hash_store(t, key, klen, (void *)value); 
    447452    lua_pop(L, 1); 
    448453  } 
     
    451456void 
    452457noit_lua_hash_to_table(lua_State *L, 
    453                        noit_hash_table *t) { 
    454   noit_hash_iter iter = NOIT_HASH_ITER_ZERO; 
     458                       mtev_hash_table *t) { 
     459  mtev_hash_iter iter = MTEV_HASH_ITER_ZERO; 
    455460  const char *key, *value; 
    456461  int klen, kcnt; 
    457   kcnt = t ? noit_hash_size(t) : 0; 
     462  kcnt = t ? mtev_hash_size(t) : 0; 
    458463  lua_createtable(L, 0, kcnt); 
    459464  if(t) { 
    460     while(noit_hash_next_str(t, &iter, &key, &klen, &value)) { 
     465    while(mtev_hash_next_str(t, &iter, &key, &klen, &value)) { 
    461466      lua_pushlstring(L, value, strlen(value)); 
    462467      lua_setfield(L, -2, key); 
     
    717722noit_lua_interpolate(lua_State *L) { 
    718723  noit_check_t *check; 
    719   noit_hash_table check_attrs_hash = NOIT_HASH_EMPTY; 
     724  mtev_hash_table check_attrs_hash = MTEV_HASH_EMPTY; 
    720725  char buff[2048]; 
    721726 
     
    752757    } 
    753758  } 
    754   noit_hash_destroy(&check_attrs_hash, NULL, NULL); 
     759  mtev_hash_destroy(&check_attrs_hash, NULL, NULL); 
    755760  return 1; 
    756761} 
     
    935940} 
    936941static int 
    937 noit_lua_module_onload(noit_image_t *img) { 
     942noit_lua_module_onload(mtev_image_t *img) { 
    938943  int rv; 
    939944  lua_State *L; 
     
    941946  struct module_conf *mc; 
    942947 
    943   mc = noit_image_get_userdata(img); 
     948  mc = mtev_image_get_userdata(img); 
    944949  noit_lua_init(); 
    945950 
     
    951956  if(rv) { 
    952957    int i; 
    953     noitL(nlerr, "lua: %s.onload failed\n", mc->object); 
     958    mtevL(nlerr, "lua: %s.onload failed\n", mc->object); 
    954959    i = lua_gettop(L); 
    955960    if(i>0) { 
     
    958963        size_t len; 
    959964        err = lua_tolstring(L, i, &len); 
    960         noitL(nlerr, "lua: %s\n", err); 
     965        mtevL(nlerr, "lua: %s\n", err); 
    961966      } 
    962967    } 
     
    969974  if(lua_isnil(L, -1)) { 
    970975    lua_pop(L, 1); 
    971     noitL(nlerr, "lua: no such object %s\n", mc->object); 
     976    mtevL(nlerr, "lua: no such object %s\n", mc->object); 
    972977    return -1; 
    973978  } 
     
    987992    return rv; 
    988993  } 
    989   noitL(nlerr, "%s.onload must return a integer not %s (%s)\n", mc->object, noit_lua_type_name(lua_type(L,-1)), lua_tostring(L,-1)); 
     994  mtevL(nlerr, "%s.onload must return a integer not %s (%s)\n", mc->object, noit_lua_type_name(lua_type(L,-1)), lua_tostring(L,-1)); 
    990995  lua_pop(L,1); 
    991996  return -1; 
     
    9991004  L = lmc->lua_state 
    10001005#define SETUP_CALL(L, object, func, failure) do { \ 
    1001   noitL(nldeb, "lua calling %s->%s\n", object, func); \ 
     1006  mtevL(nldeb, "lua calling %s->%s\n", object, func); \ 
    10021007  noit_lua_pushmodule(L, object); \ 
    10031008  lua_getfield(L, -1, func); \ 
     
    10181023    return rv; \ 
    10191024  } \ 
    1020   noitL(nlerr, "%s.%s must return a integer not %s (%s)\n", object, func, noit_lua_type_name(lua_type(L,-1)), lua_tostring(L,-1)); \ 
     1025  mtevL(nlerr, "%s.%s must return a integer not %s (%s)\n", object, func, noit_lua_type_name(lua_type(L,-1)), lua_tostring(L,-1)); \ 
    10211026  lua_pop(L,1); \ 
    10221027} while(0) 
     
    10241029static int  
    10251030noit_lua_module_config(noit_module_t *mod, 
    1026                        noit_hash_table *options) { 
     1031                       mtev_hash_table *options) { 
    10271032  struct module_conf *mc; 
    10281033  struct module_tls_conf *mtlsc; 
     
    10331038    assert(mc->options == NULL); 
    10341039    mc->options = calloc(1, sizeof(*mc->options)); 
    1035     noit_hash_init(mc->options); 
    1036     noit_hash_merge_as_dict(mc->options, options); 
     1040    mtev_hash_init(mc->options); 
     1041    mtev_hash_merge_as_dict(mc->options, options); 
    10371042  } 
    10381043  else options = mc->options; 
     
    11181123int 
    11191124noit_lua_yield(noit_lua_resume_info_t *ci, int nargs) { 
    1120   noitL(nldeb, "lua: %p yielding\n", ci->coro_state); 
     1125  mtevL(nldeb, "lua: %p yielding\n", ci->coro_state); 
    11211126  return lua_yield(ci->coro_state, nargs); 
    11221127} 
     
    11301135  assert(pthread_equal(pthread_self(), ri->bound_thread)); 
    11311136 
    1132   noitL(nldeb, "lua: %p resuming(%d)\n", ri->coro_state, nargs); 
     1137  mtevL(nldeb, "lua: %p resuming(%d)\n", ri->coro_state, nargs); 
    11331138#if LUA_VERSION_NUM >= 502 
    11341139  result = lua_resume(ri->coro_state, ri->lmc->lua_state, nargs); 
     
    11441149      if(lua_status(ri->coro_state) == 0 && lua_gettop(ri->coro_state) == 0) { 
    11451150        /* LUA_OK status with no stack means we're dead (good or bad) */ 
    1146         noitL(nldeb, "lua_State(%p) -> %d [check: %p]\n", ri->coro_state, 
     1151        mtevL(nldeb, "lua_State(%p) -> %d [check: %p]\n", ri->coro_state, 
    11471152              lua_status(ri->coro_state), ci ? ci->check: NULL); 
    11481153      } 
     
    11551160      goto done; 
    11561161    default: /* Errors */ 
    1157       noitL(nldeb, "lua resume returned: %d\n", result); 
     1162      mtevL(nldeb, "lua resume returned: %d\n", result); 
    11581163      if(check)  { 
    11591164        if(check->stats.inprogress.status) free(check->stats.inprogress.status); 
     
    11681173          err = lua_tostring(ri->coro_state, base); 
    11691174          nerr = lua_tostring(ri->coro_state, base - 2); 
    1170           if(err) noitL(nldeb, "err -> %s\n", err); 
    1171           if(nerr) noitL(nldeb, "nerr -> %s\n", nerr); 
     1175          if(err) mtevL(nldeb, "err -> %s\n", err); 
     1176          if(nerr) mtevL(nldeb, "nerr -> %s\n", nerr); 
    11721177          if(nerr && *nerr == 31) nerr = NULL; // 31? WTF lua? 
    11731178          if(err) { 
     
    12091214  noit_lua_resume_info_t *ri = int_cl->ri; 
    12101215  noit_lua_resume_check_info_t *ci = ri->context_data; 
    1211   noitL(nldeb, "lua: %p ->check_timeout\n", ri->coro_state); 
     1216  mtevL(nldeb, "lua: %p ->check_timeout\n", ri->coro_state); 
    12121217  ci->timed_out = 1; 
    12131218  noit_lua_check_deregister_event(ri, e, 0); 
     
    12971302  ri->coro_state_ref = luaL_ref(L, -2); 
    12981303  lua_pop(L, 1); /* pops noit_coros */ 
    1299   noitL(nldeb, "coro_store -> %p\n", ri->coro_state); 
     1304  mtevL(nldeb, "coro_store -> %p\n", ri->coro_state); 
    13001305  pthread_mutex_lock(&coro_lock); 
    1301   noit_hash_store(&noit_coros, 
     1306  mtev_hash_store(&noit_coros, 
    13021307                  (const char *)&ri->coro_state, sizeof(ri->coro_state), 
    13031308                  ri); 
     
    13341339     
    13351340    while (lua_getstack(L, level++, &ar)); 
    1336     noitL(noit_error, "lua panic[top:%d]: %s\n", lua_gettop(L), err); 
     1341    mtevL(noit_error, "lua panic[top:%d]: %s\n", lua_gettop(L), err); 
    13371342    while (level > 0 && lua_getstack(L, --level, &ar)) { 
    13381343      lua_getinfo(L, "Sl", &ar); 
     
    13471352        else cp = "???"; 
    13481353        if(ar.name == NULL) ar.name = "???"; 
    1349         noitL(noit_error, "\t%s:%s(%s):%d\n", cp, ar.namewhat, ar.name, ar.currentline); 
     1354        mtevL(noit_error, "\t%s:%s(%s):%d\n", cp, ar.namewhat, ar.name, ar.currentline); 
    13501355      } 
    13511356    } 
     
    13971402  rv = lua_pcall(L, 1, 1, 0); \ 
    13981403  if(rv != 0) { \ 
    1399     noitL(noit_stderr, "Loading %s: %d (%s)\n", #a, rv, lua_tostring(L,-1)); \ 
     1404    mtevL(noit_stderr, "Loading %s: %d (%s)\n", #a, rv, lua_tostring(L,-1)); \ 
    14001405    lua_close(L); \ 
    14011406    return NULL; \ 
     
    14121417  *Lptr = L; 
    14131418  pthread_mutex_lock(&noit_lua_states_lock); 
    1414   noit_hash_store(&noit_lua_states, 
     1419  mtev_hash_store(&noit_lua_states, 
    14151420                  (const char *)Lptr, sizeof(*Lptr), 
    14161421                  (void *)(vpsized_int)pthread_self()); 
     
    14191424  return L; 
    14201425} 
    1421 static noit_image_t * 
    1422 noit_lua_loader_load(noit_dso_loader_t *loader, 
     1426static mtev_image_t * 
     1427noit_lua_loader_load(mtev_dso_loader_t *loader, 
    14231428                     char *module_name, 
    1424                      noit_conf_section_t section) { 
     1429                     mtev_conf_section_t section) { 
    14251430  int rv; 
    14261431  noit_module_t *m; 
     
    14311436  char *object; 
    14321437 
    1433   noitL(nldeb, "Loading lua module: %s\n", module_name); 
    1434   if(noit_conf_get_string(section, "@object", &object) == 0) { 
    1435     noitL(nlerr, "Lua module %s require object attribute.\n", module_name); 
     1438  mtevL(nldeb, "Loading lua module: %s\n", module_name); 
     1439  if(mtev_conf_get_string(section, "@object", &object) == 0) { 
     1440    mtevL(nlerr, "Lua module %s require object attribute.\n", module_name); 
    14361441    return NULL; 
    14371442  } 
     
    14731478 
    14741479  if(noit_register_module(m)) { 
    1475     noitL(nlerr, "lua failed to register '%s' as a module\n", m->hdr.name); 
     1480    mtevL(nlerr, "lua failed to register '%s' as a module\n", m->hdr.name); 
    14761481    goto load_failed; 
    14771482  } 
    1478   return (noit_image_t *)m; 
    1479 } 
    1480  
    1481 static int 
    1482 noit_lua_loader_config(noit_dso_loader_t *self, noit_hash_table *o) { 
     1483  return (mtev_image_t *)m; 
     1484} 
     1485 
     1486static int 
     1487noit_lua_loader_config(mtev_dso_loader_t *self, mtev_hash_table *o) { 
    14831488  const char *dir = "."; 
    1484   (void)noit_hash_retr_str(o, "directory", strlen("directory"), &dir); 
     1489  (void)mtev_hash_retr_str(o, "directory", strlen("directory"), &dir); 
    14851490  noit_lua_loader_set_directory(self, dir); 
    14861491  return 0; 
    14871492} 
    14881493static int 
    1489 noit_lua_loader_onload(noit_image_t *self) { 
     1494noit_lua_loader_onload(mtev_image_t *self) { 
    14901495  loader_main_thread = pthread_self(); 
    1491   nlerr = noit_log_stream_find("error/lua"); 
    1492   nldeb = noit_log_stream_find("debug/lua"); 
     1496  nlerr = mtev_log_stream_find("error/lua"); 
     1497  nldeb = mtev_log_stream_find("debug/lua"); 
    14931498  if(!nlerr) nlerr = noit_stderr; 
    14941499  if(!nldeb) nldeb = noit_debug; 
     
    14991504 
    15001505#include "lua.xmlh" 
    1501 noit_dso_loader_t lua = { 
     1506mtev_dso_loader_t lua = { 
    15021507  { 
    1503     .magic = NOIT_LOADER_MAGIC, 
    1504     .version = NOIT_LOADER_ABI_VERSION, 
     1508    .magic = MTEV_LOADER_MAGIC, 
     1509    .version = MTEV_LOADER_ABI_VERSION, 
    15051510    .name = "lua", 
    15061511    .description = "Lua check loader", 
  • src/modules/lua_crypto.c

    r79e4037 r304ec80  
    11/* 
    2  * Copyright (c) 2014, Circonus, Inc. 
    3  * All rights reserved. 
     2 * Copyright (c) 2014-2015, Circonus, Inc. All rights reserved. 
    43 * 
    54 * Redistribution and use in source and binary forms, with or without 
     
    3029 */ 
    3130 
    32 #include "noit_defines.h" 
    33  
    34 #include "noit_conf.h" 
    35 #include "lua_noit.h" 
     31#include <mtev_defines.h> 
     32 
    3633#include <openssl/bn.h> 
    3734#include <openssl/rsa.h> 
     
    4037#include <openssl/x509v3.h> 
    4138 
     39#include <mtev_conf.h> 
     40 
     41#include "noit_mtev_bridge.h" 
     42 
     43#include "lua_noit.h" 
    4244#ifndef sk_OPENSSL_STRING_num 
    4345#define sk_OPENSSL_STRING_num sk_num 
     
    352354 
    353355    if((nid=OBJ_txt2nid(subj_part)) == NID_undef) { 
    354       noitL(noit_error, "crypto.rsa:gencsr unknown subject part %s\n", subj_part); 
     356      mtevL(noit_error, "crypto.rsa:gencsr unknown subject part %s\n", subj_part); 
    355357    } 
    356358    else if(subj_value == NULL || *subj_value == '\0') { 
    357       noitL(noit_error, "crypto.rsa:gencsr subject part %s is blank\n", subj_part); 
     359      mtevL(noit_error, "crypto.rsa:gencsr subject part %s is blank\n", subj_part); 
    358360    } 
    359361    else if(!X509_NAME_add_entry_by_NID(subject, nid, MBSTRING_ASC, 
  • src/modules/lua_dns.c

    r904ac16 r304ec80  
    22 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    33 * All rights reserved. 
     4 * Copyright (c) 2015, Circonus, Inc. All rights reserved. 
    45 * 
    56 * Redistribution and use in source and binary forms, with or without 
     
    3132 */ 
    3233 
    33 #include "noit_defines.h" 
     34#include <mtev_defines.h> 
    3435 
    3536#include <assert.h> 
     
    4546#endif 
    4647 
    47 #include "noit_conf.h" 
     48#include <mtev_conf.h> 
     49 
     50#include "noit_mtev_bridge.h" 
     51 
    4852#include "lua_noit.h" 
    4953#include "udns/udns.h" 
    5054 
    51 static noit_hash_table dns_rtypes = NOIT_HASH_EMPTY; 
    52 static noit_hash_table dns_ctypes = NOIT_HASH_EMPTY; 
    53 static __thread noit_hash_table *dns_ctx_store = NULL; 
     55static mtev_hash_table dns_rtypes = MTEV_HASH_EMPTY; 
     56static mtev_hash_table dns_ctypes = MTEV_HASH_EMPTY; 
     57static __thread mtev_hash_table *dns_ctx_store = NULL; 
    5458 
    5559typedef struct dns_ctx_handle { 
    5660  char *ns; 
    5761  struct dns_ctx *ctx; 
    58   noit_atomic32_t refcnt; 
     62  mtev_atomic32_t refcnt; 
    5963  eventer_t e; /* eventer handling UDP traffic */ 
    6064  eventer_t timeout; /* the timeout managed by libudns */ 
     
    7175  enum dns_type query_rtype; 
    7276  int active; 
    73   noit_atomic32_t refcnt; 
     77  mtev_atomic32_t refcnt; 
    7478} dns_lookup_ctx_t; 
    7579 
     
    140144    /* special case -- default context */ 
    141145    h = default_ctx_handle; 
    142     noit_atomic_inc32(&h->refcnt); 
     146    mtev_atomic_inc32(&h->refcnt); 
    143147    goto bail; 
    144148  } 
    145149  if(ns && 
    146      noit_hash_retrieve(dns_ctx_store, ns, strlen(ns), &vh)) { 
     150     mtev_hash_retrieve(dns_ctx_store, ns, strlen(ns), &vh)) { 
    147151    h = (dns_ctx_handle_t *)vh; 
    148     noit_atomic_inc32(&h->refcnt); 
     152    mtev_atomic_inc32(&h->refcnt); 
    149153  } 
    150154  else { 
     
    160164    if(dns_open(h->ctx) < 0) failed++; 
    161165    if(failed) { 
    162       noitL(noit_error, "dns_open failed\n"); 
     166      mtevL(noit_error, "dns_open failed\n"); 
    163167      free(h->ns); 
    164168      free(h); 
     
    177181      default_ctx_handle = h; 
    178182    else 
    179       noit_hash_store(dns_ctx_store, h->ns, strlen(h->ns), h); 
     183      mtev_hash_store(dns_ctx_store, h->ns, strlen(h->ns), h); 
    180184  } 
    181185 bail: 
     
    186190  if(h->ns == NULL) { 
    187191    /* Special case for the default */ 
    188     noit_atomic_dec32(&h->refcnt); 
     192    mtev_atomic_dec32(&h->refcnt); 
    189193    return; 
    190194  } 
    191195  if(!dns_ctx_store) dns_ctx_store = calloc(1, sizeof(*dns_ctx_store)); 
    192   if(noit_atomic_dec32(&h->refcnt) == 0) { 
     196  if(mtev_atomic_dec32(&h->refcnt) == 0) { 
    193197    /* I was the last one */ 
    194     assert(noit_hash_delete(dns_ctx_store, h->ns, strlen(h->ns), 
     198    assert(mtev_hash_delete(dns_ctx_store, h->ns, strlen(h->ns), 
    195199                            NULL, dns_ctx_handle_free)); 
    196200  } 
     
    203207  if(v->error) free(v->error); 
    204208  v->error = NULL; 
    205   if(noit_atomic_dec32(&v->refcnt) == 0) { 
     209  if(mtev_atomic_dec32(&v->refcnt) == 0) { 
    206210    dns_ctx_release(v->h); 
    207211    free(v); 
     
    427431  *d = '\0'; 
    428432 
    429   if(!noit_hash_retrieve(&dns_ctypes, ctype_up, strlen(ctype_up), &vnv_pair)) 
     433  if(!mtev_hash_retrieve(&dns_ctypes, ctype_up, strlen(ctype_up), &vnv_pair)) 
    430434    dlc->error = strdup("bad class"); 
    431435  else 
    432436    dlc->query_ctype = (enum dns_class)((struct dns_nameval *)vnv_pair)->val; 
    433437 
    434   if(!noit_hash_retrieve(&dns_rtypes, rtype_up, strlen(rtype_up), &vnv_pair))  
     438  if(!mtev_hash_retrieve(&dns_rtypes, rtype_up, strlen(rtype_up), &vnv_pair))  
    435439    dlc->error = strdup("bad rr type"); 
    436440  else 
     
    438442 
    439443  dlc->active = 1; 
    440   noit_atomic_inc32(&dlc->refcnt); 
     444  mtev_atomic_inc32(&dlc->refcnt); 
    441445  if(!dlc->error) { 
    442446    int abs; 
     
    445449                      abs | DNS_NOSRCH, NULL, dns_cb, dlc)) { 
    446450      dlc->error = strdup("submission error"); 
    447       noit_atomic_dec32(&dlc->refcnt); 
     451      mtev_atomic_dec32(&dlc->refcnt); 
    448452    } 
    449453    else { 
     
    497501  /* HASH the rr types */ 
    498502  for(i=0, nv = dns_type_index(i); nv->name; nv = dns_type_index(++i)) 
    499     noit_hash_store(&dns_rtypes, 
     503    mtev_hash_store(&dns_rtypes, 
    500504                    nv->name, strlen(nv->name), 
    501505                    (void *)nv); 
    502506  /* HASH the class types */ 
    503507  for(i=0, nv = dns_class_index(i); nv->name; nv = dns_class_index(++i)) 
    504     noit_hash_store(&dns_ctypes, 
     508    mtev_hash_store(&dns_ctypes, 
    505509                    nv->name, strlen(nv->name), 
    506510                    (void *)nv); 
     
    510514 
    511515  if (dns_init(NULL, 0) < 0 || (pctx = dns_new(NULL)) == NULL) { 
    512     noitL(noit_error, "Unable to initialize dns subsystem\n"); 
     516    mtevL(noit_error, "Unable to initialize dns subsystem\n"); 
    513517  } 
    514518  else 
  • src/modules/lua_general.c

    r1174acf r304ec80  
    11/* 
    2  * Copyright (c) 2013, Circonus, Inc. 
    3  * All rights reserved. 
     2 * Copyright (c) 2013-2015, Circonus, Inc. All rights reserved. 
    43 * 
    54 * Redistribution and use in source and binary forms, with or without 
     
    3029 */ 
    3130 
    32 #include "noit_defines.h" 
    33 #include "noit_module.h" 
    34 #include "noit_http.h" 
    35 #include "noit_rest.h" 
     31#include <mtev_defines.h> 
     32 
     33#include <mtev_dso.h> 
     34#include <mtev_http.h> 
     35#include <mtev_rest.h> 
     36#include <mtev_reverse_socket.h> 
     37 
    3638#include "noit_filters.h" 
    37 #include "noit_reverse_socket.h" 
    3839#define LUA_COMPAT_MODULE 
    3940#include "lua_noit.h" 
     
    4142#include <assert.h> 
    4243 
    43 static noit_log_stream_t nlerr = NULL; 
    44 static noit_log_stream_t nldeb = NULL; 
     44static mtev_log_stream_t nlerr = NULL; 
     45static mtev_log_stream_t nldeb = NULL; 
    4546 
    4647#define lua_general_xml_description  "" 
     
    5556} lua_general_conf_t; 
    5657 
    57 static lua_general_conf_t *get_config(noit_dso_generic_t *self) { 
    58   lua_general_conf_t *conf = noit_image_get_userdata(&self->hdr); 
     58static lua_general_conf_t *get_config(mtev_dso_generic_t *self) { 
     59  lua_general_conf_t *conf = mtev_image_get_userdata(&self->hdr); 
    5960  if(conf) return conf; 
    6061  conf = calloc(1, sizeof(*conf)); 
    61   noit_image_set_userdata(&self->hdr, conf); 
     62  mtev_image_set_userdata(&self->hdr, conf); 
    6263  return conf; 
    6364} 
     
    6768  noit_lua_resume_info_t *ri = cl; 
    6869  if(ri) { 
    69     noitL(nldeb, "lua_general(%p) -> stopping job (%p)\n", 
     70    mtevL(nldeb, "lua_general(%p) -> stopping job (%p)\n", 
    7071          ri->lmc->lua_state, ri->coro_state); 
    7172    noit_lua_cancel_coro(ri); 
     
    9899        if(lua_isstring(ri->coro_state, base-1)) { 
    99100          err = lua_tostring(ri->coro_state, base-1); 
    100           noitL(nlerr, "err -> %s\n", err); 
     101          mtevL(nlerr, "err -> %s\n", err); 
    101102        } 
    102103      } 
     
    121122  noit_lua_set_resume_info(lmc->lua_state, ri); 
    122123  lua_pop(lmc->lua_state, 1); /* pops noit_coros */ 
    123   noitL(nldeb, "lua_general(%p) -> starting new job (%p)\n", 
     124  mtevL(nldeb, "lua_general(%p) -> starting new job (%p)\n", 
    124125        lmc->lua_state, ri->coro_state); 
    125126  return ri; 
     
    127128 
    128129static int 
    129 lua_general_handler(noit_dso_generic_t *self) { 
     130lua_general_handler(mtev_dso_generic_t *self) { 
    130131  int status, rv; 
    131132  lua_general_conf_t *conf = get_config(self); 
     
    147148  if(rv) { 
    148149    int i; 
    149     noitL(nlerr, "lua: require %s failed\n", conf->module); 
     150    mtevL(nlerr, "lua: require %s failed\n", conf->module); 
    150151    i = lua_gettop(L); 
    151152    if(i>0) { 
     
    154155        size_t len; 
    155156        err = lua_tolstring(L, i, &len); 
    156         noitL(nlerr, "lua: %s\n", err); 
     157        mtevL(nlerr, "lua: %s\n", err); 
    157158      } 
    158159    } 
     
    182183  if(status == 0) return 0; 
    183184  /* If we've failed, resume has freed ri, so we should just return. */ 
    184   noitL(nlerr, "lua dispatch error: %d\n", status); 
     185  mtevL(nlerr, "lua dispatch error: %d\n", status); 
    185186  return 0; 
    186187 
    187188 boom: 
    188   if(err) noitL(nlerr, "lua dispatch error: %s\n", err); 
     189  if(err) mtevL(nlerr, "lua dispatch error: %s\n", err); 
    189190  if(ri) lua_general_ctx_free(ri); 
    190191  return 0; 
     
    215216int 
    216217dispatch_general(eventer_t e, int mask, void *cl, struct timeval *now) { 
    217   return lua_general_handler((noit_dso_generic_t *)cl); 
    218 } 
    219  
    220 static int 
    221 noit_lua_general_config(noit_dso_generic_t *self, noit_hash_table *o) { 
     218  return lua_general_handler((mtev_dso_generic_t *)cl); 
     219} 
     220 
     221static int 
     222noit_lua_general_config(mtev_dso_generic_t *self, mtev_hash_table *o) { 
    222223  lua_general_conf_t *conf = get_config(self); 
    223224  conf->script_dir = ""; 
    224225  conf->module = NULL; 
    225226  conf->function = NULL; 
    226   (void)noit_hash_retr_str(o, "directory", strlen("directory"), &conf->script_dir); 
     227  (void)mtev_hash_retr_str(o, "directory", strlen("directory"), &conf->script_dir); 
    227228  if(conf->script_dir) conf->script_dir = strdup(conf->script_dir); 
    228   (void)noit_hash_retr_str(o, "lua_module", strlen("lua_module"), &conf->module); 
     229  (void)mtev_hash_retr_str(o, "lua_module", strlen("lua_module"), &conf->module); 
    229230  if(conf->module) conf->module = strdup(conf->module); 
    230   (void)noit_hash_retr_str(o, "lua_function", strlen("lua_function"), &conf->function); 
     231  (void)mtev_hash_retr_str(o, "lua_function", strlen("lua_function"), &conf->function); 
    231232  if(conf->function) conf->function = strdup(conf->function); 
    232233  return 0; 
     
    237238  const char *host; 
    238239  int port; 
    239   noit_hash_table *sslconfig = NULL, *config = NULL; 
     240  mtev_hash_table *sslconfig = NULL, *config = NULL; 
    240241  if(lua_gettop(L) < 2 || 
    241242     !lua_isstring(L,1) || 
     
    250251  if(lua_gettop(L)>=4) config = noit_lua_table_to_hash(L,4); 
    251252 
    252   noit_lua_help_initiate_noit_connection(host, port, sslconfig, config); 
     253  mtev_lua_help_initiate_mtev_connection(host, port, sslconfig, config); 
    253254 
    254255  if(sslconfig) { 
    255     noit_hash_destroy(sslconfig, NULL, NULL); 
     256    mtev_hash_destroy(sslconfig, NULL, NULL); 
    256257    free(sslconfig); 
    257258  } 
    258259  if(config) { 
    259     noit_hash_destroy(config, NULL, NULL); 
     260    mtev_hash_destroy(config, NULL, NULL); 
    260261    free(config); 
    261262  } 
     
    270271    luaL_error(L, "reverse_stop(host,port)"); 
    271272 
    272   rv = noit_reverse_socket_connection_shutdown(lua_tostring(L,1), lua_tointeger(L,2)); 
     273  rv = mtev_reverse_socket_connection_shutdown(lua_tostring(L,1), lua_tointeger(L,2)); 
    273274  lua_pushboolean(L,rv); 
    274275  return 1; 
     
    279280  int rv; 
    280281  rv = noit_filtersets_cull_unused(); 
    281   if(rv > 0) noit_conf_mark_changed(); 
     282  if(rv > 0) mtev_conf_mark_changed(); 
    282283  lua_pushinteger(L, rv); 
    283284  return 1; 
     
    287288lua_general_conf_save(lua_State *L) { 
    288289  /* Invert the response to indicate a truthy success in lua */ 
    289   lua_pushboolean(L, noit_conf_write_file(NULL) ? 0 : 1); 
     290  lua_pushboolean(L, mtev_conf_write_file(NULL) ? 0 : 1); 
    290291  return 1; 
    291292} 
     
    303304 
    304305static int 
    305 noit_lua_general_init(noit_dso_generic_t *self) { 
     306noit_lua_general_init(mtev_dso_generic_t *self) { 
    306307  lua_general_conf_t *conf = get_config(self); 
    307308  lua_module_closure_t *lmc = &conf->lmc; 
    308309 
    309310  if(!conf->module || !conf->function) { 
    310     noitL(nlerr, "lua_general cannot be used without module and function config\n"); 
     311    mtevL(nlerr, "lua_general cannot be used without module and function config\n"); 
    311312    return -1; 
    312313  } 
     
    315316  lmc->owner = pthread_self(); 
    316317  lmc->lua_state = noit_lua_open(self->hdr.name, lmc, conf->script_dir); 
    317   noitL(nldeb, "lua_general opening state -> %p\n", lmc->lua_state); 
     318  mtevL(nldeb, "lua_general opening state -> %p\n", lmc->lua_state); 
    318319  if(lmc->lua_state == NULL) { 
    319     noitL(noit_error, "lua_general could not add general functions\n"); 
     320    mtevL(mtev_error, "lua_general could not add general functions\n"); 
    320321    return -1; 
    321322  } 
     
    327328 
    328329static int 
    329 noit_lua_general_onload(noit_image_t *self) { 
    330   nlerr = noit_log_stream_find("error/lua"); 
    331   nldeb = noit_log_stream_find("debug/lua"); 
    332   if(!nlerr) nlerr = noit_stderr; 
    333   if(!nldeb) nldeb = noit_debug; 
    334   return 0; 
    335 } 
    336  
    337 noit_dso_generic_t lua_general = { 
     330noit_lua_general_onload(mtev_image_t *self) { 
     331  nlerr = mtev_log_stream_find("error/lua"); 
     332  nldeb = mtev_log_stream_find("debug/lua"); 
     333  if(!nlerr) nlerr = mtev_stderr; 
     334  if(!nldeb) nldeb = mtev_debug; 
     335  return 0; 
     336} 
     337 
     338mtev_dso_generic_t lua_general = { 
    338339  { 
    339     NOIT_GENERIC_MAGIC, 
    340     NOIT_GENERIC_ABI_VERSION, 
     340    MTEV_GENERIC_MAGIC, 
     341    MTEV_GENERIC_ABI_VERSION, 
    341342    "lua_general", 
    342343    "general services in lua", 
  • src/modules/lua_http.c

    rb90582c r304ec80  
    11/* 
    2  * Copyright (c) 2013, Circonus, Inc. 
    3  * All rights reserved. 
     2 * Copyright (c) 2013-2015, Circonus, Inc. All rights reserved. 
    43 * 
    54 * Redistribution and use in source and binary forms, with or without 
     
    3029 */ 
    3130 
    32 #include "noit_defines.h" 
    33 #include "noit_module.h" 
    34 #include "lua_http.h" 
    35 #include "lua_noit.h" 
    36 #include "lauxlib.h" 
     31#include <mtev_defines.h> 
     32 
    3733#include <errno.h> 
    3834#include <sys/mman.h> 
    3935#include <assert.h> 
     36#include <lauxlib.h> 
     37 
     38#include <mtev_dso.h> 
     39 
     40#include "lua_http.h" 
     41#include "lua_noit.h" 
    4042 
    4143#define OO_LUA_DECL(L, type, var, methodvar) \ 
     
    6769static int 
    6870noit_lua_http_request_headers(lua_State *L) { 
    69   noit_hash_table *h; 
    70   CCALL_DECL(L, noit_http_request, req, 0); 
    71   h = noit_http_request_headers_table(req); 
     71  mtev_hash_table *h; 
     72  CCALL_DECL(L, mtev_http_request, req, 0); 
     73  h = mtev_http_request_headers_table(req); 
    7274  if(lua_gettop(L) == 1) 
    7375    noit_lua_hash_to_table(L, h); 
     
    7981      memcpy(lower, hdr, strlen(hdr)+1); 
    8082      for(cp=lower; *cp; cp++) *cp = tolower(*cp); 
    81       if(noit_hash_retr_str(h, lower, strlen(lower), &hdr)) 
     83      if(mtev_hash_retr_str(h, lower, strlen(lower), &hdr)) 
    8284        lua_pushstring(L, hdr); 
    8385      else 
     
    8587    } 
    8688  } 
    87   else luaL_error(L, "invalid arguments to noit_http_request:headers()"); 
     89  else luaL_error(L, "invalid arguments to mtev_http_request:headers()"); 
    8890  return 1; 
    8991} 
    9092static int 
    9193noit_lua_http_request_querystring(lua_State *L) { 
    92   noit_hash_table *h; 
    93   CCALL_DECL(L, noit_http_request, req, 0); 
    94   h = noit_http_request_querystring_table(req); 
     94  mtev_hash_table *h; 
     95  CCALL_DECL(L, mtev_http_request, req, 0); 
     96  h = mtev_http_request_querystring_table(req); 
    9597  if(lua_gettop(L) == 1) 
    9698    noit_lua_hash_to_table(L, h); 
     
    99101    if(key == NULL) lua_pushnil(L); 
    100102    else { 
    101       if(noit_hash_retr_str(h, key, strlen(key), &value)) 
     103      if(mtev_hash_retr_str(h, key, strlen(key), &value)) 
    102104        lua_pushstring(L, value); 
    103105      else 
     
    105107    } 
    106108  } 
    107   else luaL_error(L, "invalid arguments to noit_http_request:querystring()"); 
     109  else luaL_error(L, "invalid arguments to mtev_http_request:querystring()"); 
    108110  return 1; 
    109111} 
    110112static int 
    111113noit_lua_http_request_uri(lua_State *L) { 
    112   CCALL_DECL(L, noit_http_request, req, 1); 
    113   lua_pushstring(L, noit_http_request_uri_str(req)); 
     114  CCALL_DECL(L, mtev_http_request, req, 1); 
     115  lua_pushstring(L, mtev_http_request_uri_str(req)); 
    114116  return 1; 
    115117} 
    116118static int 
    117119noit_lua_http_request_method(lua_State *L) { 
    118   CCALL_DECL(L, noit_http_request, req, 1); 
    119   lua_pushstring(L, noit_http_request_method_str(req)); 
     120  CCALL_DECL(L, mtev_http_request, req, 1); 
     121  lua_pushstring(L, mtev_http_request_method_str(req)); 
    120122  return 1; 
    121123} 
     
    126128  has_arg = (lua_gettop(L) == 2); 
    127129  if(lua_gettop(L) > 2) 
    128     luaL_error(L, "invalid arguments to noit_http_request:form()"); 
     130    luaL_error(L, "invalid arguments to mtev_http_request:form()"); 
    129131 
    130132  lua_getglobal(L, "noit"); 
     
    144146  has_arg = (lua_gettop(L) == 2); 
    145147  if(lua_gettop(L) > 2) 
    146     luaL_error(L, "invalid arguments to noit_http_request:cookie()"); 
     148    luaL_error(L, "invalid arguments to mtev_http_request:cookie()"); 
    147149 
    148150  lua_getglobal(L, "noit"); 
     
    160162  const void *payload = NULL; 
    161163  int64_t size; 
    162   CCALL_DECL(L, noit_http_request, req, 1); 
    163   payload = noit_http_request_get_upload(req, &size); 
     164  CCALL_DECL(L, mtev_http_request, req, 1); 
     165  payload = mtev_http_request_get_upload(req, &size); 
    164166  if(payload) 
    165167    lua_pushlstring(L, (char *)payload, size); 
     
    178180 
    179181static int 
    180 noit_http_request_index_func(lua_State *L) { 
    181   OO_LUA_DECL(L, noit_http_request, req, k); 
     182mtev_http_request_index_func(lua_State *L) { 
     183  OO_LUA_DECL(L, mtev_http_request, req, k); 
    182184  switch(*k) { 
    183185    case 'c': 
     
    205207      break; 
    206208  } 
    207   luaL_error(L, "noit_http_request no such element: %s", k); 
     209  luaL_error(L, "mtev_http_request no such element: %s", k); 
    208210  return 0; 
    209211} 
    210212void 
    211213noit_lua_setup_http_request(lua_State *L, 
    212                             noit_http_request *req) { 
    213   noit_http_request **addr; 
    214   addr = (noit_http_request **)lua_newuserdata(L, sizeof(req)); 
     214                            mtev_http_request *req) { 
     215  mtev_http_request **addr; 
     216  addr = (mtev_http_request **)lua_newuserdata(L, sizeof(req)); 
    215217  *addr = req; 
    216   if(luaL_newmetatable(L, "noit_http_request") == 1) { 
    217     lua_pushcclosure(L, noit_http_request_index_func, 0); 
     218  if(luaL_newmetatable(L, "mtev_http_request") == 1) { 
     219    lua_pushcclosure(L, mtev_http_request_index_func, 0); 
    218220    lua_setfield(L, -2, "__index"); 
    219221  } 
     
    223225static int 
    224226noit_lua_http_option_set(lua_State *L) { 
    225   CCALL_DECL(L, noit_http_session_ctx, http_ctx, 2); 
     227  CCALL_DECL(L, mtev_http_session_ctx, http_ctx, 2); 
    226228  u_int32_t opt = lua_tointeger(L,2); 
    227   lua_pushboolean(L, noit_http_response_option_set(http_ctx, opt)); 
     229  lua_pushboolean(L, mtev_http_response_option_set(http_ctx, opt)); 
    228230  return 1; 
    229231} 
     
    231233noit_lua_http_status_set(lua_State *L) { 
    232234  const char *val; 
    233   CCALL_DECL(L, noit_http_session_ctx, http_ctx, 3); 
     235  CCALL_DECL(L, mtev_http_session_ctx, http_ctx, 3); 
    234236  val = lua_tostring(L,3); 
    235237  val = val ? val : "YeeHaw"; 
    236   noit_http_response_status_set(http_ctx, lua_tointeger(L,2), val); 
     238  mtev_http_response_status_set(http_ctx, lua_tointeger(L,2), val); 
    237239  return 0; 
    238240} 
     
    240242noit_lua_http_header_set(lua_State *L) { 
    241243  const char *hdr, *val; 
    242   CCALL_DECL(L, noit_http_session_ctx, http_ctx, 3); 
     244  CCALL_DECL(L, mtev_http_session_ctx, http_ctx, 3); 
    243245  hdr = lua_tostring(L,2); 
    244246  val = lua_tostring(L,3); 
    245247  if(!hdr || !val) luaL_error(L, "invalid header or headervalue"); 
    246   noit_http_response_header_set(http_ctx, hdr, val); 
     248  mtev_http_response_header_set(http_ctx, hdr, val); 
    247249  return 0; 
    248250} 
    249251static int 
    250252noit_lua_http_flush_and_end(lua_State *L) { 
    251   CCALL_DECL(L, noit_http_session_ctx, http_ctx, 1); 
    252   noit_http_response_end(http_ctx); 
     253  CCALL_DECL(L, mtev_http_session_ctx, http_ctx, 1); 
     254  mtev_http_response_end(http_ctx); 
    253255  return 0; 
    254256} 
    255257static int 
    256258noit_lua_http_flush(lua_State *L) { 
    257   CCALL_DECL(L, noit_http_session_ctx, http_ctx, 1); 
    258   noit_http_response_flush(http_ctx, noit_false); 
     259  CCALL_DECL(L, mtev_http_session_ctx, http_ctx, 1); 
     260  mtev_http_response_flush(http_ctx, mtev_false); 
    259261  return 0; 
    260262} 
    261263static int 
    262264noit_lua_http_write(lua_State *L) { 
    263   noit_boolean status = noit_false; 
     265  mtev_boolean status = mtev_false; 
    264266  size_t inlen; 
    265267  const char *message; 
    266   CCALL_DECL(L, noit_http_session_ctx, http_ctx, 2); 
     268  CCALL_DECL(L, mtev_http_session_ctx, http_ctx, 2); 
    267269 
    268270  message = lua_tolstring(L, 2, &inlen); 
    269271  if(message) 
    270     status = noit_http_response_append(http_ctx, message, inlen); 
     272    status = mtev_http_response_append(http_ctx, message, inlen); 
    271273  lua_pushboolean(L, status); 
    272274  return 1; 
     
    275277static int 
    276278noit_lua_http_write_fd(lua_State *L) { 
    277   noit_boolean status = noit_false; 
     279  mtev_boolean status = mtev_false; 
    278280  int fd; 
    279281  size_t size = 0; 
    280282  off_t offset = 0; 
    281   noit_http_session_ctx *http_ctx; 
     283  mtev_http_session_ctx *http_ctx; 
    282284  http_ctx = lua_touserdata(L, lua_upvalueindex(1)); 
    283285  if(lua_gettop(L) < 2 || lua_gettop(L) > 4) 
     
    295297    } 
    296298    if(lua_gettop(L) == 4) offset = (off_t)lua_tointeger(L, 4); 
    297     status = noit_http_response_append_mmap(http_ctx, fd, size, MAP_SHARED, offset); 
     299    status = mtev_http_response_append_mmap(http_ctx, fd, size, MAP_SHARED, offset); 
    298300  } 
    299301 
     
    309311  n = lua_gettop(L); 
    310312  if(n < 3 || n > 4) 
    311     luaL_error(L, "invalid arguments to noit_http_session:set_cookie()");