Host and service descriptions with spaces

1 view
Skip to first unread message

Martin, Jared

unread,
Sep 5, 2006, 8:32:09 AM9/5/06
to nagios...@googlegroups.com
FYI heres an easy fix:

My hosts have Aliases with spaces, many of my other descriptions do too.
To get nagios_config to import them correctly, I had to make the
following change in services_import.php from:
Line 18: $lineArray = preg_split("/[\s]+/", $line);

To:
Line 18: $lineArray = preg_split("/[\s]+/", $line,2);

The same can be done with the other import scripts.

--------------------------------------------------------

IRS Circular 230 Disclosure:
To ensure compliance with requirements imposed by the IRS, we inform you that any U.S. federal tax advice contained in this communication (including any attachments) is not intended or written to be used, and cannot be used, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein. For more information please click on the following link: http://www.dglaw.com/circular/

This message contains confidential information and is intended only for nagios...@googlegroups.com. If you are not nagios...@googlegroups.com you should not disseminate, distribute or copy this e-mail. Please notify JMa...@dglaw.com immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.

Reply all
Reply to author
Forward
0 new messages