Book Image

Learning Nagios 3.0

Book Image

Learning Nagios 3.0

Overview of this book

Table of Contents (16 chapters)
Learning Nagios 3.0
Credits
About the Author
About the Reviewer
Preface

Managing Nagios


Your application might also want to have some control over Nagios. You might want to expose an interface for users to take control of your monitoring system, for example, a web interface or a client-server system. You might also want to handle custom authorization and access control list. This is something that is beyond the functionality offered by the web interface that Nagios comes with.

In such cases, it is best to create your own system for reading the current status, as well as for sending commands directly over the external command pipe. In both cases, this is very easy to do from any programming language.

The first part is showing Nagios' current status. This requires reading the status.dat file, parsing it to any data format, and then manipulating it. The format of the file is relatively simple — each object is enclosed in a section. Each section contains one or more name=value directives. For example, the following is a definition of information about the status...