OpenNetAdmin

Track. Automate. Configure.

Home About Features Community Develop
Download this project as a tar.gz file

How to configure Host Actions URL?

krashduke

22-07-2009 04:14:38

Hi,

Does anyone know how to configure the "Host Actions" URLs to Cacti, Wiki, Splunk etc. for each host?
Thanks.

Matt

22-07-2009 09:05:52

I still have the edit configuration button in the title bar but that obviously does not do anything. It was a good idea that will probably never happen.

You can manually configure it via one of the two files that control its configuration:

/opt/ona/www/workspace_plugins/builtin/host_actions/config.inc.php
and
/opt/ona/www/local/config/host_actions.config.php

The first config file contains the default items that come with the system. The second is the user config file that you should make changes to. You can remove/disable a default item by re defining it in the local config with a blank url value.

I'll include a config file here just so everyone can see some examples of what you can do with it.


<?php
// NOTE: This file will be overwritten when you upgrade!!!
// You should copy this file to www/local/config/host_actions.config.php and make changes there
//
// This section defines host actions. If you leave the url blank it will not show the option in the list
// You can use %fqdn, %ip and %loc as substitutions in the url for the host being displayed
// You can specify a tooltip title for the option, otherwise it defaults to the hostaction name "Telnet" "Splunk" etc
// These will be listed in the order specified here.
// %loc = the "reference" value from the hosts location
// %fqdn = the fully qualified primary name of this host
// %ip = the IP address of the primary interface for this host


//EXAMPLE:$conf[$modulename]['LINK_TITLE']['url'] = "http://something";
$conf[$modulename]['Splunk']['url'] = "https://splunk.example.com:8001/?events/?eventspage=1&num=10&q=%fqdn";
$conf[$modulename]['Cacti Graph']['url'] = "https://cacti.%loc.example.com/cacti/graph_view.php?action=tree&name=%fqdn"; // requires patch to cacti
$conf[$modulename]['Wiki Page']['url'] = "https://wiki.example.com/dokuwiki/network/servers/%fqdn";


$conf[$modulename]['Splunk']['url'] = ""; // This line disables the first definition above
$conf[$modulename]['SSH']['url'] = "ssh://%fqdn";
$conf[$modulename]['Nagios']['url'] = "https://nagios.%loc.example.com/nagios/cgi-bin/status.cgi?host=%fqdn&style=detail";

?>




Now that I'm getting the new plugin framework in place, I expect this will no longer come default with the system the way it does now. It will be a plugin in the future and will not have the same configuration file location. It will however continue to work similarly.

krashduke

23-07-2009 04:12:13

I see, thanks very much for the info.