ndoutils | NDOUtils - Database Output for Nagios Core | Plugin library

 by   NagiosEnterprises C Version: ndoutils-2.1.3 License: GPL-2.0

kandi X-RAY | ndoutils Summary

kandi X-RAY | ndoutils Summary

ndoutils is a C library typically used in Plugin applications. ndoutils has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has low support. You can download it from GitHub.

NDOUtils - Database Output for Nagios Core
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              ndoutils has a low active ecosystem.
              It has 46 star(s) with 21 fork(s). There are 19 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 3 open issues and 46 have been closed. On average issues are closed in 312 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of ndoutils is ndoutils-2.1.3

            kandi-Quality Quality

              ndoutils has 0 bugs and 0 code smells.

            kandi-Security Security

              ndoutils has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              ndoutils code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              ndoutils is licensed under the GPL-2.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              ndoutils releases are available to install and integrate.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ndoutils
            Get all kandi verified functions for this library.

            ndoutils Key Features

            No Key Features are available at this moment for ndoutils.

            ndoutils Examples and Code Snippets

            No Code Snippets are available at this moment for ndoutils.

            Community Discussions

            QUESTION

            MySQL C API - Bulk insert performance question
            Asked 2019-Sep-12 at 20:38

            I'm working on a rewrite of a popular add-on module (NDOUtils) for an even more popular application (Nagios). This module adds functionality to Nagios by making the objects/statuses/histories of each object available in a database.

            The current available version takes the data from Nagios (via some registered callbacks/function pointers) and sends it over a socket where an additional process listens and queues the data up. Finally, an additional process then pops the data from the queue and builds mysql queries for insertion.

            Although it works, and has worked for quite some time, we encounter problems on larger systems (15k+ objects defined in Nagios configurations). We decided to start over and re-write the module to handle the database calls directly (via mysql c api prepared statements).

            This works beautifully for the status data. One problem we face is that on startup, we need to get the object definitions into the database. Since the definitions can change each time the process starts, we truncate the appropriate tables and recreate each object. This works fine for most systems...

            But for large systems, this process can take upwards of several minutes - and this is a blocking process - several minutes is unacceptable, and this is exacerbated on critical monitoring setups.

            So, to get this rewrite underway, I kept things simple. To begin with, I looped over each object definition, and built a simple query and then inserted. Once each of that type of object were inserted, I looped back over the objects for all of the objects that are related (for example, each host definition likely has a contact or contactgroup associated with it. Those relationships need to be identified). This was the easiest to read, but extremely slow on a system with 15k hosts and 25k services. Extremely slow as in 3 minutes.

            Of course we can do better than that. I rewrote the major functions (hosts and services) to only need to loop over the object list twice each, and instead of sending an individual query per object or relationship, we build a bulk insert query. The code for this looks something like this:

            ...

            ANSWER

            Answered 2019-Sep-12 at 20:38

            Your code at first glance does not appear to have any issues that would cause a performance problem like this. With this amount of data I would expect the code to run in a few seconds given normal hardware/OS behavior. I would recommend examining two possible pain points:

            1. How fast are you generating the data to insert? (Replace the insertion part of the code to a NOOP)
            2. If you determine in step 1 that the data is being generated quickly enough, the problem is with the write performance of the database.

            Regardless, it is very likely that you have to troubleshoot on the database server level - run SHOW PROCESSLIST to start, then SHOW ENGINE INNODB STATUS if you are using InnoDB, and if all else fails, grab stacktrace shots of mysqld process with gdb.

            Likely culprit is something horribly wrong with the I/O subsystem of the server or perhaps some form of synchronous replication is enabled, but it is hard to know for sure without some server-level diagnostic.

            Source https://stackoverflow.com/questions/57912475

            QUESTION

            NDOutils link host-service
            Asked 2017-Feb-20 at 15:05

            I would like to know which tables/column allow to link a host with his services in NDOutils?

            I need to display a list of some hosts with their own services. I looked but could not find out.

            Thank you.

            ...

            ANSWER

            Answered 2017-Feb-20 at 15:05

            The tables nagios_hosts and nagios_services have a column called host_object_id. This is your link.

            SELECT host_object_id FROM nagios_hosts WHERE display_name = 'localhost'

            SELECT display_name FROM nagios_services WHERE host_object_id = (SELECT host_object_id FROM nagios_hosts WHERE display_name = 'localhost' LIMIT 1)

            Hope this helps.

            Source https://stackoverflow.com/questions/42340421

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install ndoutils

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/NagiosEnterprises/ndoutils.git

          • CLI

            gh repo clone NagiosEnterprises/ndoutils

          • sshUrl

            git@github.com:NagiosEnterprises/ndoutils.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link