zensendaudit utility

You can send custom log messages using the zensendaudit script.

  1. Log in to the Control Center host as a user with serviced CLI privileges.
  2. Attach to the zope service.
    serviced service attach zope
  3. Change to the zenoss user.
    su - zenoss
  4. Run the zensendaudit script.
    zensendaudit MessageText

    where MessageText is the text you want displayed in the log.

    For example, zensendaudit Hello world. will generate the following output:
    Message sent: Hello world.
    It will log the following message in the zenossaudit fields.type in the application-audit.log that can also be viewed in Kibana.
    2017-07-14 19:10:18 INFO action=Log kind=Comment comment="Hello world."
    source=Shell process=zensendaudit logname=zenoss parameters="Hello world."