1.2.1 • Published 4 years ago

logs-to-mqtt-publisher v1.2.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

logs-to-mqtt-publisher

A server-side JavaScript tool that converts log statements to topics/messages and publishes them to an mqtt broker. This is intended to be used in docker, but could be consumed as an npm package.

npm version Build Status codecov Dependencies Dev Dependencies Peer Dependencies Known Vulnerabilities All Contributors

Example

Options
{
    log: true,
    logWatches: [
        {
            filePath: '/var/log/unifi-video/motion.log',
            logParses: [
                {
                    topicParse: {
                        regularExpression: '/motion|House West/g',
                        output: '{0}/{1}'
                    },
                    messageParse: {
                        regularExpression: '/start/g',
                        output: '{0}'
                    }
                }
            ]
        }
    ],
    mqtt: {
        host: 'localhost',
        port: '1883',
        username: 'broker',
        password: 'Ypl8%Q1X#4'
    }
}
docker-compose.yaml

Repository example: https://github.com/TonyBrobston/unifi-video-publisher-example

Documentation

start(options: Options): Promise‹void›
stop(): Promise‹void›

Feedback

Do you have an idea for making logs-to-mqtt-publisher better? Add your idea under the issues tab, we'd love to hear about it!

Contributors

Thanks goes to these wonderful people:

Tony Brobston💻
1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago