What is a TAGS Nagios custom macro

This forum was archived to /woltlab and is now in read-only mode.
  • Hello,

    I'm trying to activate the action feature of NagVis to be able to right click on a host and SSH directly into it from the context menu. I don't understand what is the TAGS Nagios custom macro as explained into the documentation and where to configure/activate it. I'm using Nagvis version 1.8.5 with PHP version 5.5.11 and Apache 2.2.32, thanks.


  • This page for version 1.8 -> http://docs.nagvis.org/1.8/en_…t_description.html#action

    They talk about custom macro TAGS!!! According to Nagios documentation, this is called custom object variables. Therefore it should be written as custom variables TAGS with example to help people understand this part.

    Add the following line inside your Unix/Linux host cfg file (for a host)

    _TAGS unix

    Add the following line inside your Windows host cfg file (for a host)

    _TAGS win

    Add the following line inside your web server host cfg file (for a host)

    _TAGS web-443


    Question: I can't find something for Telnet! Just RDP, SSH, HTTP or HTTPS.


  • Question: I can't find something for Telnet! Just RDP, SSH, HTTP or HTTPS.

    Looking at the source code of .../actions/win_ssh.php there is a section creating output of a cmd file:

    1. echo "@echo off\n";
    2. echo "REM # This file has been generated by NagVis.\n";
    3. echo "REM # \n";
    4. echo "REM # Simply execute the file to connect to the host via SSH. We assume\n";
    5. echo "REM # that you have putty installed and in your system path.\n";
    6. echo "putty -ssh ".$host_address." 22\n";

    Copying win_ssh.php to win_telnet.php, changing all occurcences of ssh to telnet, adjusting the putty call to telnet, and creating a "[action_win_telnet]" section in the main configuration file similar to the example shown in the documentation might work.

    1. [action_win_telnet]
    2. action_type="win_telnet"
    3. obj_type="host,service"
    4. client_os="win"
    5. condition="TAGS~win"
  • Thanks, but I've already tried this without success. Seem that something is still missing to make it appears in the context menu.

  • Example of how I got this to work with NagiosXI:

    1> Configure Nagvis as mentioned previously to enable the link features,

    2> In Nagios navigate through Configure/Core Configuration Management/Hosts.

    3> Select a host to modify then select the 'Misc Settings' tab.

    4> Click on the 'Manage Free Variables' link (javascript popup will appear).

    5> In the name field enter _TAGS. (The leading underscore is required.)

    6> If the host is a web server then in the value field you could enter web-80 or web-443, whichever is appropriate.

    7> Click on the "Insert>" button and you should see those values applied.

    8> Click "Close", click "Save" then click "Apply Configuration".

    9> Reload the map that has the host you just edited.

    A right-click on that host should now have the option you just added below the options you already had.