Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Overview

It There are various scenarios where it may be desirable to save a report to another server.  Making access reports on a separate server, for example making the report available to users that do not have access to the OMK server is a possilbe use case., or distributed generation of reports, but centralised access.

OpReports currently doesn't support cross-server centralisation out of the box, but reports are generated in a self-contained fashion and thus can be transferred safely to a central server. This document describes the simplest two options, file sharing via NFS and periodic copy using This article will discuss two methods of saving the report to a distant server; NFS and rsync.

Directory Sharing Options

NFS

Summary Steps

  • rsync - Recommend Option
  • NFSv4
  • Distant Server
    • Install NFS utilities
    • Enable service
    • Export directory
  • OMK Server
    • Install NFS utilities
    • Create directory in /mnt/nfs
    • Mount the directory

rsync

Summary Steps

  • Distant Server
    • Select user for rsync actions
    • Install the appropriate ssh public key in .ssh/authorized_keys
    • Select a directory for opReports (ensure permissions are correct)
  • OMK Server
    • Select a directory for opReports that should be placed on the distant server.
    • Create a cron job that rsync's the selected directory to the corresponding distant server directory.

Example cron job

Code Block
title/etc/cron.d/reportSync
### This cron job will sync the /data/reports directory to a distant server at a one minute interval.
* * * * * root rsync -rz /data/reports 192.168.10.71:/data/share/omk/.

 

Configuration

The new directory needs to be added to the opreports_output_dirs array in /usr/local/omk/conf/opCommon.nmis.  In the example below /data/reports was added.

...

Following this change restart the omkd service and reload the browser.  When adding or editing a new report schedule the new output directory will be available in the drop down menu.

...