NSClient++ Help (#1) - Graphite protocol (#1014) - Message List

Graphite protocol

Howdy, I see in the blog that Graphite is supported now, but I can't find any documentation for how it works. Does Nagios have to send a check, then NSC++ sends the same data to Graphite as well as Nagios? How do I point NSC++ to the Graphite server?

thanks

  • Message #2670

    Don't recall the details off the top of my head buuut...

    1. enable the GraphiteClient module (/modules)
    2. Setup a default target (/settings/graphite/client/targets/default) pointing to your graphite server
    3. setup passive check (/settings/scheduler/schedules/foobar) which send data on the graphite channel.

    A short configuration snippet which does this:

    [/modules]
    CheckSystem = 1
    Scheduler = 1
    GraphiteClient = 1
    CheckExternalScripts = 1
    [/settings/scheduler/schedules/foobar]
    command=alias_cpu
    interval=10s
    channel=graphite
    [/settings/graphite/client/targets/default]
    address=192.168.0.1
    

    There is a lot of other things which can be configured as well this is just a "minimum configuration required" sort of thing...

    In around a week or so the documentation for 0.4.0 will be updated in regards to configuration. And hopefully during summer for commands and such (but they are usually the same as for 0.3.9). I am currently writing scripts to create this for me...

    Michael Medin

    • Message #2679

      Thanks for your reply.

      I'm somewhat new to this so bear with me. I enabled the module in the nsclient.ini file. I installed NSCP from the msi, and it did not create a /settings directory. I looked in the reference manual and didn't see any reference to this directory either. Should I be creating it manually? Or do I install a different way to get it to create that directory tree?

      thanks

      • Message #2680

        Sorry...

        the /.../ are not folders they are section in the nsclient.ini file...

        So essentially open nsclient.ini and add in the above snippet (with some modifications)...

        • Message #2682

          I've successfully set up the ini file with your suggestion, and it's sending data to Graphite, but not graphing anything.

          I did a tcp dump, and it looks like the date stamp on the data being sent is in 2030, which would explain why Graphite isn't graphing it. Example:

          4E..system.vm-01.cpu.1m.100.190612775 6.system.vm-01.cpu.30s.100.1906127756.

          The system time on my VM is set properly. Any other idea why it would be sending an incorrect date/time?

          thanks

          • Message #2683

            Sorry, should have mentioned but I forgot.

            This has been fixed in later builds...

            2012-06-18 MickeM
            ...
             * Fixed Graphite client using wrong time for datestamp
            

            Check if any of the builds 0.4.1 or 0.4.0 (under nightly) is after that date. I shall update (release) 0.4.0 tomorrow as well as make some new nightly builds of 0.4.1 and 0.4.2...

            Michael Medin

            • Message #2684

              Excellent, thanks. I suppose I should have looked through the changelog.

              • Message #2686

                I installed today's 0.4.1 build and things are graphing on the proper day now, but they're still 5 hours behind. Example:

                11:26:39.187797 system.vm-01.cpu.30s.0.1342092390. (which is 'Thu Jul 12 06:26:30 2012')

                Any ideas? thanks

                • Message #2687

                  Any timezone which might affect things? Currently I am sending "the local time, second level resolution, based on the time zone settings of the computer." perhaps graphite expects (or live in) utc or some such?

                  unfortunately the graphite protocol docs (at least the ones I have found) are a bit vague as they just say "timestamp" so not sure what timezone and such is used...

                  Michael Medin

                  • Message #2691

                    According to this, Graphite expects UNIX epoch time. I assume you're converting from Windows time to UNIX time already? It would make sense as I'm in CDT which is GMT -5.

                    • Message #2692

                      Yes, I convert to epoc already but alas "unix time" does not have a timezone attached to it (as I understand it).

                      Well, let me try to change it to use utc by default instead and add a flag to override it so timezone can be configured...

                      Michael Medin

                      • Message #2712

                        Hi, is the new code in your 7/31 nightly builds? thanks

                        • Message #2716

                          Just to clearify this would be: NSCP-0.4.1.24, I haven tested this though :)

                        • Message #2715

                          Sorry, compleatly forgot about you...

                          New build from today has the change...

                          Michael Medin

Subscriptions