Adding monitoring
Now that we have a fully functioning pack, we can add monitoring to it. Monitoring in OneOps is handled by Nagios, which is an industry standard monitoring tool. Fortunately, Nagios also comes with many utility scripts and monitors preinstalled so we can readily use them instead of reinventing the wheel. These scripts can generally be found in the /opt/Nagios/libexec
directory. So, if we want to add monitoring to the pack that we just added, all we have to do is to use the Java log file monitoring from Nagios, which comes built in. Since OrientDB is Java-based it works out well for us. All we must do is add the code below to orientdb.rb
in the packs
directory.
monitors => { 'Log' => {:description => 'Log', :source => '', :chart => {'min' => 0, 'unit' => ''}, :cmd => 'check_logfiles!logorientdb!#{cmd_options[:logfile]}! #{cmd_options...