Comment File Format


Introduction

In order to help share information among administrators, techs, etc., NetSaint allows comments to be added to all hosts and services that are being monitored. The comments are stored in the file specified by the comment_file directive in the main configuration file.

It should be noted that NetSaint "cleans" the comment file each time it restarts. During the cleaning process, NetSaint will remove all comments that are not marked as being persistent or that do not correspond to valid hosts or services that you have defined, and it will re-number all comment IDs.

Adding Comments

If you wish to use or write an external application that adds comments to hosts or services, you should not write comments directly to the comment file. Instead, use the ADD_SVC_COMMENT and ADD_HOST_COMMENT external commands. The commands should be written to the external command file. NetSaint will periodically scan the external command file and process any commands it finds in there.

Deleting Comments

Similiarly, if you want to delete one or more comments from the command file, use the DEL_SVC_COMMENT, DEL_HOST_COMMENT, DEL_ALL_SVC_COMMENTS, or DEL_ALL_HOST_COMMENTS external commands. Do not modify the contents of the comment file yourself!

File Format

The comment file contains two types of entries: host comments and service comments. The format for each type of comment it described below.

Host Comment Format:

[<timestamp>] HOST_COMMENT;<id>;<host_name>;<persistent>;<author>;<comment>

where...

Service Comment Format:

[<timestamp>] SERVICE_COMMENT;<id>;<host_name>;<svc_description>;<persistent>;<author>;<comment>

where...