NSClient++ Help (#1) - Graphite protocol (#1014) - Message List
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?
Don't recall the details off the top of my head buuut...
- enable the GraphiteClient module (/modules)
- Setup a default target (/settings/graphite/client/targets/default) pointing to your graphite server
- 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 Medinmickem07/02/12 11:50:40 (11 months ago)
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?
thanksluther.r07/02/12 19:44:08 (11 months ago)
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)...mickem07/03/12 08:24:35 (11 months ago)
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:
The system time on my VM is set properly. Any other idea why it would be sending an incorrect date/time?
thanksluther.r07/10/12 23:04:40 (10 months ago)
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 Medinmickem07/10/12 23:55:47 (10 months ago)
Excellent, thanks. I suppose I should have looked through the changelog.luther.r07/11/12 00:02:18 (10 months ago)
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? thanksluther.r07/12/12 21:09:02 (10 months ago)
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 Medinmickem07/12/12 21:52:55 (10 months ago)
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.luther.r07/13/12 00:08:55 (10 months ago)
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 Medinmickem07/13/12 07:19:11 (10 months ago)
Hi, is the new code in your 7/31 nightly builds? thanksluther.r07/31/12 16:35:05 (10 months ago)