Netify Sink Log Plugin

Introduction

The Netify Sink Log plugin provides a mechanism to write Netify objects directly to the host filesystem.

License

The Netify Sink Log Plugin is open-source software. It can be dual-licensed under the GPLv3 or a commercial license. Please contact us for details.

Installation

Netify plugins are packaged in the same workflow as the agent and can be installed using a similar syntax that was implemented during the installation of the Netify agent. Plugins are compiled and made available for x86 on mirrors. For other architectures like ARM and MIPS, please contact us

Select your installation target for specific instructions on how to install this plugin.

Plugins are compiled against specific Netify agent versions and require ABI compatibility. Click here for more information.
Netify mirros can be found here.

Configuration

Plugin Loader Configuration

All plugins are disabled by default, and the Netify Sink Log plugin is no different. To enable:

netifyd --enable-plugin sink-log
A plugin can also be disabled in this way by substituting --disable-plugin.

Alternatively, you can edit /etc/netifyd/plugins.d/10-netify-sink-log.conf and set enable to yes.

# Netify Agent Log Sink Plugin Loader
# Copyright (C) 2023 eGloo Incorporated
#
# This is free software, licensed under the GNU General Public License v3.
#
##############################################################################
 
[sink-log]
enable = yes
plugin_library = /usr/lib64/libnetify-sink-log.so.0.0.0
conf_filename = ${path_state_persistent}/netify-sink-log.json
 
# vim: set ft=dosini :

Plugin Configuration

Once the plugin has been enabled, it can be configured using the defined JSON configuration file specified in the plugin loader configuration. Let's look at a configuration sample to review the syntax and parts of the file.

{
    "overwrite": false,
    "log_path": "/tmp",
    "channels": {
        "default": {
            "overwrite": true,
            "log_path": "/tmp",
            "log_name": "netify-log-"
        }
    }
}
Property overwrite
Description Global setting that will determine if an existing filename in the path already exists. If overwrite is set to false, and an existing file exists, it will not overwrite the data.
Type boolean
Options true, false
Default false
Property log_path
Description Global setting that sets the default folder path.
Type string
Default /tmp
Property channels
Description An object array that defines one or more channels to be available to the core processors.
Type object
Options Depends on local configuration (see Channel Objects section below)
Channel Objects

The Log Sink's channel object list determines which instances to log to. In the example above, we are defining only one, the defaultchannel. Let's take a closer look at the configuration.

Property overwrite
Description See global section above.
Type boolean
Property log_path
Description See global section above.
Type string
Property log_name
Description A string that will be prepended to the filename that will include timestamps to denote the creation time.
Type string

Examples

Create a default channel to send data coming from processors (ex. core, aggregate, device discovery etc.) to the /tmp folder.

{
    "overwrite": false,
    "log_path": "/tmp",
    "channels": {
        "default": {
            "overwrite": true,
            "log_path": "/tmp",
            "log_name": "netify-log-"
        }
    }
}

Technical Support

Haven't found the answers you're looking for?

Contact Us