Page 2 of 2

Re: Nagios XI monitoring Mac OS X via agent

Posted: Tue Nov 04, 2014 6:26 pm
by adny
So I took the NCPA installer and reworked the script so it pointed to where the files actually were.

Status:

User is there.
Group is there.

Permissions and ownership seems to all be set correctly.

Launchctl agents appear to both be running...

Can't access server on default NCPA port...

After restart, Launch Daemons run but I see this:

Console Logs:

Code: Select all

11/4/14 6:21:10 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener) Throttling respawn: Will start in 10 seconds
11/4/14 6:21:20 PM	com.apple.ReportCrash.Root[316]	2014-11-04 18:21:20.399 ReportCrash[316:290b] Failed to create CSSymbolicatorRef for launchd
11/4/14 6:21:20 PM	com.apple.ReportCrash.Root[316]	2014-11-04 18:21:20.401 ReportCrash[316:290b] Saved crash report for launchd[933] version ??? (???) to /Library/Logs/DiagnosticReports/launchd_2014-11-04-182120_localhost.crash
11/4/14 6:21:20 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener[933]) Job appears to have crashed: Illegal instruction
11/4/14 6:21:20 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener) Throttling respawn: Will start in 10 seconds
11/4/14 6:21:26 PM	[0x0-0x10010].com.apple.Terminal[288]	Tue Nov  4 18:21:26 tensix10.ptmonitor Terminal[288] <Error>: kCGErrorIllegalArgument: CGSShapeWindow
11/4/14 6:21:26 PM	[0x0-0x10010].com.apple.Terminal[288]	Tue Nov  4 18:21:26 tensix10.ptmonitor Terminal[288] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
11/4/14 6:21:30 PM	com.apple.ReportCrash.Root[316]	2014-11-04 18:21:30.518 ReportCrash[316:250f] Failed to create CSSymbolicatorRef for launchd
11/4/14 6:21:30 PM	com.apple.ReportCrash.Root[316]	2014-11-04 18:21:30.519 ReportCrash[316:250f] Saved crash report for launchd[939] version ??? (???) to /Library/Logs/DiagnosticReports/launchd_2014-11-04-182130_localhost.crash
11/4/14 6:21:30 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener[939]) Job appears to have crashed: Illegal instruction
11/4/14 6:21:30 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener) Throttling respawn: Will start in 10 seconds
11/4/14 6:21:40 PM	com.apple.ReportCrash.Root[316]	2014-11-04 18:21:40.638 ReportCrash[316:2c0b] Failed to create CSSymbolicatorRef for launchd
11/4/14 6:21:40 PM	com.apple.ReportCrash.Root[316]	2014-11-04 18:21:40.639 ReportCrash[316:2c0b] Saved crash report for launchd[941] version ??? (???) to /Library/Logs/DiagnosticReports/launchd_2014-11-04-182140_localhost.crash
11/4/14 6:21:40 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener[941]) Job appears to have crashed: Illegal instruction
11/4/14 6:21:40 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener) Throttling respawn: Will start in 10 seconds
11/4/14 6:21:50 PM	com.apple.ReportCrash.Root[316]	2014-11-04 18:21:50.760 ReportCrash[316:2a0f] Failed to create CSSymbolicatorRef for launchd
11/4/14 6:21:50 PM	com.apple.ReportCrash.Root[316]	2014-11-04 18:21:50.762 ReportCrash[316:2a0f] Saved crash report for launchd[942] version ??? (???) to /Library/Logs/DiagnosticReports/launchd_2014-11-04-182150_localhost.crash
11/4/14 6:21:50 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener[942]) Job appears to have crashed: Illegal instruction
11/4/14 6:21:50 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener) Throttling respawn: Will start in 10 seconds
11/4/14 6:22:00 PM	com.apple.ReportCrash.Root[948]	2014-11-04 18:22:00.890 ReportCrash[948:1407] Failed to create CSSymbolicatorRef for launchd
11/4/14 6:22:00 PM	com.apple.ReportCrash.Root[948]	2014-11-04 18:22:00.893 ReportCrash[948:1407] Saved crash report for launchd[947] version ??? (???) to /Library/Logs/DiagnosticReports/launchd_2014-11-04-182200_localhost.crash
11/4/14 6:22:00 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener[947]) Job appears to have crashed: Illegal instruction
11/4/14 6:22:00 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener) Throttling respawn: Will start in 10 seconds
11/4/14 6:22:11 PM	com.apple.ReportCrash.Root[948]	2014-11-04 18:22:11.010 ReportCrash[948:2b03] Failed to create CSSymbolicatorRef for launchd
11/4/14 6:22:11 PM	com.apple.ReportCrash.Root[948]	2014-11-04 18:22:11.012 ReportCrash[948:2b03] Saved crash report for launchd[962] version ??? (???) to /Library/Logs/DiagnosticReports/launchd_2014-11-04-182211_localhost.crash
11/4/14 6:22:11 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener[962]) Job appears to have crashed: Illegal instruction
11/4/14 6:22:11 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener) Throttling respawn: Will start in 10 seconds
11/4/14 6:22:21 PM	com.apple.ReportCrash.Root[948]	2014-11-04 18:22:21.137 ReportCrash[948:290b] Failed to create CSSymbolicatorRef for launchd
11/4/14 6:22:21 PM	com.apple.ReportCrash.Root[948]	2014-11-04 18:22:21.139 ReportCrash[948:290b] Saved crash report for launchd[963] version ??? (???) to /Library/Logs/DiagnosticReports/launchd_2014-11-04-182221_localhost.crash
11/4/14 6:22:21 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener[963]) Job appears to have crashed: Illegal instruction
11/4/14 6:22:21 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener) Throttling respawn: Will start in 10 seconds
11/4/14 6:22:31 PM	com.apple.ReportCrash.Root[948]	2014-11-04 18:22:31.254 ReportCrash[948:250f] Failed to create CSSymbolicatorRef for launchd
11/4/14 6:22:31 PM	com.apple.ReportCrash.Root[948]	2014-11-04 18:22:31.256 ReportCrash[948:250f] Saved crash report for launchd[964] version ??? (???) to /Library/Logs/DiagnosticReports/launchd_2014-11-04-182231_localhost.crash
11/4/14 6:22:31 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener[964]) Job appears to have crashed: Illegal instruction
11/4/14 6:22:31 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener) Throttling respawn: Will start in 10 seconds
11/4/14 6:22:41 PM	com.apple.ReportCrash.Root[948]	2014-11-04 18:22:41.372 ReportCrash[948:2c0b] Failed to create CSSymbolicatorRef for launchd
11/4/14 6:22:41 PM	com.apple.ReportCrash.Root[948]	2014-11-04 18:22:41.375 ReportCrash[948:2c0b] Saved crash report for launchd[965] version ??? (???) to /Library/Logs/DiagnosticReports/launchd_2014-11-04-182241_localhost.crash
11/4/14 6:22:41 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener[965]) Job appears to have crashed: Illegal instruction
11/4/14 6:22:41 PM	com.apple.launchd[1]	(com.nagios.ncpa.listener) Throttling respawn: Will start in 10 seconds

Crash output:

Code: Select all

Process:         launchd [941]
Path:            /sbin/launchd
Identifier:      launchd
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  launchd [1]

Date/Time:       2014-11-04 18:21:40.533 -0500
OS Version:      Mac OS X Server 10.6.8 (10K549)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGILL)
Exception Codes: KERN_INVALID_ADDRESS at 0xfffffffffffffff8
Crashed Thread:  Unknown

Backtrace not available

Unknown thread crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000055  rbx: 0x0000000000000000  rcx: 0x0000000000000000  rdx: 0x0000000000000000
  rdi: 0x0000000000000000  rsi: 0x0000000000000000  rbp: 0x0000000000000000  rsp: 0x0000000000000000
   r8: 0x0000000000000000   r9: 0x0000000000000000  r10: 0x0000000000000000  r11: 0x0000000000000000
  r12: 0x0000000000000000  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 0x0000000000000000
  rip: 0x00007fff5fc01028  rfl: 0x0000000000010203  cr2: 0xfffffffffffffff8

Binary images description not available

So, it won't start.

Re: Nagios XI monitoring Mac OS X via agent

Posted: Wed Nov 05, 2014 3:48 pm
by sreinhardt
Do you have access to a 10.6 installer DMG or DVD? If so, licensing allows for installing in VMware or Parallels on an OS X host.
I honestly don't know, but I'm definitely going to check, so far we didn't believe that we were allowed any virtual installs and were looking for alternative licensing.

As for the current state of ncpabuild, this is something that I am actively working on, and am getting ready to push some major updates to. Will it fix mac, I don't yet know, but if I can get a vm like you suggest then I would be more than happy to work it out there! I may be incorrect, but if ncpabuild can work for you, it should leave you with a dmg that can be installed without dev tools. NRPE, that's not quite an option, but you could definitely find what files it adds and move them to same version systems. The only real dependency would be SSL and base C libs that should be available on most any system.

When you were commenting on all XI checks for those services being a 255, that is generally an issue with the plugin exiting incorrectly. In that case, you likely may not have an issue with the agent.

The last post, ouch, I'm guessing thats an issue with the python to cython/executable conversion. I'm not sure I'll be able to test pre-vm setup, was this after using the ncpabuild version, or a version of ncpa in dmg already?

Re: Nagios XI monitoring Mac OS X via agent

Posted: Wed Nov 05, 2014 4:51 pm
by adny
sreinhardt wrote:
Do you have access to a 10.6 installer DMG or DVD? If so, licensing allows for installing in VMware or Parallels on an OS X host.
I honestly don't know, but I'm definitely going to check, so far we didn't believe that we were allowed any virtual installs and were looking for alternative licensing.
From Apple's SLA:
[you are granted a limited, non-transferable, non-exclusive license] to install, use and run up to two (2) additional copies or instances of the Apple Software within virtual operating system environments on each Mac Computer you own or control that is already running the Apple Software, for purposes of: (a) software development; (b) testing during software development; (c) using OS X Server; or (d) personal, non-commercial use.
This text has appeared in Apple's licensing for some time now. It, however, specifically limits licensing to only on Apple-branded hardware: so while VMware Fusion will allow your OS X 10.9.5 client to run a virtual machine containing OS X 10.6.8 Server, VMware for Windows, ESX, or otherwise, will not.



sreinhardt wrote:As for the current state of ncpabuild, this is something that I am actively working on, and am getting ready to push some major updates to. Will it fix mac, I don't yet know, but if I can get a vm like you suggest then I would be more than happy to work it out there! I may be incorrect, but if ncpabuild can work for you, it should leave you with a dmg that can be installed without dev tools. NRPE, that's not quite an option, but you could definitely find what files it adds and move them to same version systems. The only real dependency would be SSL and base C libs that should be available on most any system.
To clarify then, should ncpabuild facilitate creating a DMG installation that can then be effectively pushed out to hundreds of clients? I didn't realise that was the case. If that's so, I'm happy to attempt getting the pre-reqs sorted and to see if I can get the thing working.
sreinhardt wrote:When you were commenting on all XI checks for those services being a 255, that is generally an issue with the plugin exiting incorrectly. In that case, you likely may not have an issue with the agent.
XI is saying that but I've experienced that with the NRPE plugin testing too: if the plugin isn't running correctly on the monitored machine, it seems to return that error.
sreinhardt wrote:The last post, ouch, I'm guessing thats an issue with the python to cython/executable conversion. I'm not sure I'll be able to test pre-vm setup, was this after using the ncpabuild version, or a version of ncpa in dmg already?
This was after using the DMG, and reworking the script so it wasn't looking in the wrong place for the contents of said disk image. Do I need Cython installed to be able to make NCPA work? I've attempted installing it using this, but it looks like it's not going to work without the full Xcode installation being thrown on there. Time to roll back the VM and try that way! :/

Re: Nagios XI monitoring Mac OS X via agent

Posted: Wed Nov 05, 2014 5:58 pm
by sreinhardt
Thanks for the note on apple licensing, I will definitely be looking into what we have. We do have mac hardware to run on, so thats not an issue thankfully!

Yes! ncpabuild is what we use to make dmg's. Up to this point it has been working for our test systems, but always on older versions of osx without systemd\systemctl where a bunch of issues are happening. Once I push my changes, I'll reach out to you for mac stuff if we don't end up resolving it immidiately internally. I'd be very happy to work out issues with you!

nrpe: right you are, generally ncpa won't given a 255 if I recall correctly, so I wasn't sure which route you were going at that point, nrpe or ncpa.

I know that ncpa does need xcode and other osx build utils, however cython should definitely not be needed if you are using a dmg install. My guess would be that it's compiled for a version that does not work with your versions shared libraries. Very common and something we are used to in Windows and Linux, just time to wrap our heads around OSX too.

Re: Nagios XI monitoring Mac OS X via agent

Posted: Wed Nov 05, 2014 7:24 pm
by adny
sreinhardt wrote:Yes! ncpabuild is what we use to make dmg's. Up to this point it has been working for our test systems, but always on older versions of osx without systemd\systemctl where a bunch of issues are happening. Once I push my changes, I'll reach out to you for mac stuff if we don't end up resolving it immidiately internally. I'd be very happy to work out issues with you!

nrpe: right you are, generally ncpa won't given a 255 if I recall correctly, so I wasn't sure which route you were going at that point, nrpe or ncpa.
I'm trying to use whichever works: NRPE seems good on 10.8 and above, but neither function on 10.6.8 for me. NCPA seems like the better choice if it was designed as an NRPE replacement, but I'll need to read up more on it for creating certain checks: what I'd assumed I'd be doing with NRPE I may reconsider. (Checking, for example, Active Directory is functioning properly on an OS X Server instance by searching dscl for a certain AD user/group, querying AFP for total users connected, etc.) NRPE has the groundwork laid: I have created .pkg installers for 10.8 and above that can be rolled out to hundreds of machines at once via Apple Remote Desktop. This thread continued in part because of 10.6.8 - something that's (unfortunately) likely to be around in my production environments for at least 12-42 months from now.
sreinhardt wrote:I know that ncpa does need xcode and other osx build utils, however cython should definitely not be needed if you are using a dmg install. My guess would be that it's compiled for a version that does not work with your versions shared libraries. Very common and something we are used to in Windows and Linux, just time to wrap our heads around OSX too.
Which OS X versions have you tested it on? I'd be interested to see if I can get it running on those too.

Re: Nagios XI monitoring Mac OS X via agent

Posted: Thu Nov 06, 2014 4:19 pm
by sreinhardt
I'm just being pulled into the builds now, after some other systems I've built for testing our code. So I actually do not know which versions we have fully tested on. I know that testing has always been on versions pre systemctl\systemd, but not sure where that is in osx timeline. I'll take a peek into 10.6.8 since you mentioned that specifically, and see if I can't get a build going this weekend.

Re: Nagios XI monitoring Mac OS X via agent

Posted: Fri Nov 07, 2014 11:58 am
by adny
sreinhardt wrote:I'm just being pulled into the builds now, after some other systems I've built for testing our code. So I actually do not know which versions we have fully tested on. I know that testing has always been on versions pre systemctl\systemd, but not sure where that is in osx timeline. I'll take a peek into 10.6.8 since you mentioned that specifically, and see if I can't get a build going this weekend.
10.6.8 would be fantastic, but I can't begin to roll XI out properly without that and 10.9.5 support. I'm testing 10.9.5 today to see if I can build & roll NCPA out successfully, and will update when I have a result.

Re: Nagios XI monitoring Mac OS X via agent

Posted: Fri Nov 07, 2014 3:29 pm
by sreinhardt
Sounds great! Let me know how it goes and if there's anything immediately I can correct.