<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
    <version>4.4</version>
    <date>2020-04-22T11:39:42Z</date>
    <groups>
        <group>
            <name>Template RDP</name>
        </group>
    </groups>
    <templates>
        <template>
            <template>Template - Windows Terminal Server RDP</template>
            <name>Template - Windows Terminal Server RDP</name>
            <description># Improved by Ilias Aidar 24/09/2019, originally created by Diego Cavalcante - 10/02/2017&#13;
# Monitoring Windows RDP - Terminal Server</description>
            <groups>
                <group>
                    <name>Template RDP</name>
                </group>
            </groups>
            <applications>
                <application>
                    <name>★ RDP ★ Terminal Server</name>
                </application>
                <application>
                    <name>★ Service ★</name>
                </application>
            </applications>
            <items>
                <item>
                    <name>Port</name>
                    <type>ZABBIX_ACTIVE</type>
                    <key>net.tcp.port[,{$RDPPORT}]</key>
                    <delay>300</delay>
                    <history>7d</history>
                    <trends>30d</trends>
                    <description>Monitoring RDP port</description>
                    <applications>
                        <application>
                            <name>★ RDP ★ Terminal Server</name>
                        </application>
                    </applications>
                    <valuemap>
                        <name>★ STATUS ★ Check Port</name>
                    </valuemap>
                    <triggers>
                        <trigger>
                            <expression>{last(0)}=0</expression>
                            <name>RDP Port ({ITEM.LASTVALUE})</name>
                            <priority>WARNING</priority>
                            <description>Terminal Server port is not listening.</description>
                            <manual_close>YES</manual_close>
                        </trigger>
                    </triggers>
                </item>
                <item>
                    <name>Total Active Users</name>
                    <type>ZABBIX_ACTIVE</type>
                    <key>rdpts[ACTIVENUM]</key>
                    <delay>120</delay>
                    <history>7d</history>
                    <trends>30d</trends>
                    <description>Total number of active users on Terminal Server.</description>
                    <applications>
                        <application>
                            <name>★ RDP ★ Terminal Server</name>
                        </application>
                    </applications>
                    <triggers>
                        <trigger>
                            <expression>{last()}&gt;{$RDPA}</expression>
                            <name>RDP ({ITEM.LASTVALUE}) Connected Users</name>
                            <priority>WARNING</priority>
                            <description>There are too many TS-connected users on the server right now, it can cause overload and loss of performance.&#13;&#13;Limit for this server = {$RDPA}</description>
                            <manual_close>YES</manual_close>
                        </trigger>
                    </triggers>
                </item>
                <item>
                    <name>Active Users</name>
                    <type>ZABBIX_ACTIVE</type>
                    <key>rdpts[ACTIVE]</key>
                    <delay>120</delay>
                    <history>30d</history>
                    <trends>0</trends>
                    <value_type>TEXT</value_type>
                    <description>Monitors which users are connected to Terminal Server.</description>
                    <applications>
                        <application>
                            <name>★ RDP ★ Terminal Server</name>
                        </application>
                    </applications>
                </item>
                <item>
                    <name>Remote Computer Names</name>
                    <type>ZABBIX_ACTIVE</type>
                    <key>rdpts[DEVICE]</key>
                    <delay>120</delay>
                    <history>30d</history>
                    <trends>0</trends>
                    <value_type>TEXT</value_type>
                    <description>Monitoring inactive Remote Computer Names on Terminal Server.</description>
                    <applications>
                        <application>
                            <name>★ RDP ★ Terminal Server</name>
                        </application>
                    </applications>
                </item>
                <item>
                    <name>Total Inactive Users</name>
                    <type>ZABBIX_ACTIVE</type>
                    <key>rdpts[INACTIVENUM]</key>
                    <delay>120</delay>
                    <history>7d</history>
                    <trends>30d</trends>
                    <description>Monitoring of total disconnected users on Terminal Server.</description>
                    <applications>
                        <application>
                            <name>★ RDP ★ Terminal Server</name>
                        </application>
                    </applications>
                    <triggers>
                        <trigger>
                            <expression>{last()}&gt;{$RDPI}</expression>
                            <name>RDP ({ITEM.LASTVALUE}) Inactive Users</name>
                            <priority>INFO</priority>
                            <description>There are too many TS inactive users on the server right now, it can cause overload and performance loss.&#13;&#13;Limit for this server = {$RDPI}</description>
                            <manual_close>YES</manual_close>
                        </trigger>
                    </triggers>
                </item>
                <item>
                    <name>Inactive Users</name>
                    <type>ZABBIX_ACTIVE</type>
                    <key>rdpts[INACTIVE]</key>
                    <delay>120</delay>
                    <history>30d</history>
                    <trends>0</trends>
                    <value_type>TEXT</value_type>
                    <description>Monitors which users are logged out of Terminal Server.</description>
                    <applications>
                        <application>
                            <name>★ RDP ★ Terminal Server</name>
                        </application>
                    </applications>
                </item>
                <item>
                    <name>IP Address of Remote Users</name>
                    <key>rdpts[IP]</key>
                    <delay>120</delay>
                    <history>30d</history>
                    <trends>0</trends>
                    <value_type>TEXT</value_type>
                    <description>IP Address Monitoring of Users.</description>
                    <applications>
                        <application>
                            <name>★ RDP ★ Terminal Server</name>
                        </application>
                    </applications>
                </item>
                <item>
                    <name>Remote Desktop Services</name>
                    <type>ZABBIX_ACTIVE</type>
                    <key>service.info[TermService]</key>
                    <delay>300</delay>
                    <history>7d</history>
                    <trends>30d</trends>
                    <description>Service: TermService&#13;Name: Remote Desktop Services&#13;Description: Allows users to interactively connect to a remote computer. Remote Desktop and Remote Desktop Session Host Server depend on this service. To prevent remote use of this computer, clear the check boxes on the Remote tab of the Control panel item System Properties..</description>
                    <applications>
                        <application>
                            <name>★ Service ★</name>
                        </application>
                    </applications>
                    <valuemap>
                        <name>★ STATUS ★ Service</name>
                    </valuemap>
                    <triggers>
                        <trigger>
                            <expression>{count(#3,0,gt)}=3</expression>
                            <name>Remote Desktop Services ({ITEM.LASTVALUE})</name>
                            <priority>WARNING</priority>
                            <description>Service: TermService&#13;Name: Remote Desktop Services&#13;Description: Allows users to interactively connect to a remote computer. Remote Desktop and Remote Desktop Session Host Server depend on this service. To prevent remote use of this computer, clear the check boxes on the Remote tab of the Control panel item System Properties.</description>
                            <manual_close>YES</manual_close>
                        </trigger>
                    </triggers>
                </item>
                <item>
                    <name>Remote Desktop Licensing</name>
                    <type>ZABBIX_ACTIVE</type>
                    <key>service.info[TermServLicensing]</key>
                    <delay>300</delay>
                    <history>7d</history>
                    <trends>30d</trends>
                    <description>Service: TermServLicensing&#13;Name: Remote Desktop Licensing&#13;Description: Provides registered licenses for Remote Desktop Services clients. If this service is stopped, the server will not be available to issue Remote Desktop Services licenses to clients when they are requested.</description>
                    <applications>
                        <application>
                            <name>★ Service ★</name>
                        </application>
                    </applications>
                    <valuemap>
                        <name>★ STATUS ★ Service</name>
                    </valuemap>
                    <triggers>
                        <trigger>
                            <expression>{count(#3,0,gt)}=3</expression>
                            <name>Remote Desktop Licensing ({ITEM.LASTVALUE})</name>
                            <priority>WARNING</priority>
                            <description>Service: TermServLicensing&#13;Name: Remote Desktop Licensing&#13;Description: Provides registered licenses for Remote Desktop Services clients. If this service is stopped, the server will not be available to issue Remote Desktop Services licenses to clients when they are requested.</description>
                            <manual_close>YES</manual_close>
                        </trigger>
                    </triggers>
                </item>
            </items>
            <macros>
                <macro>
                    <macro>{$RDPA}</macro>
                    <value>90</value>
                </macro>
                <macro>
                    <macro>{$RDPI}</macro>
                    <value>10</value>
                </macro>
                <macro>
                    <macro>{$RDPPORT}</macro>
                    <value>3389</value>
                </macro>
            </macros>
        </template>
    </templates>
    <graphs>
        <graph>
            <name>★ RDP ★ Connections Statistics</name>
            <graph_items>
                <graph_item>
                    <drawtype>GRADIENT_LINE</drawtype>
                    <color>00CC00</color>
                    <yaxisside>RIGHT</yaxisside>
                    <calc_fnc>ALL</calc_fnc>
                    <item>
                        <host>Template - Windows Terminal Server RDP</host>
                        <key>rdpts[ACTIVENUM]</key>
                    </item>
                </graph_item>
                <graph_item>
                    <sortorder>1</sortorder>
                    <drawtype>GRADIENT_LINE</drawtype>
                    <color>F63100</color>
                    <calc_fnc>ALL</calc_fnc>
                    <item>
                        <host>Template - Windows Terminal Server RDP</host>
                        <key>rdpts[INACTIVENUM]</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
    </graphs>
    <value_maps>
        <value_map>
            <name>★ STATUS ★ Check Port</name>
            <mappings>
                <mapping>
                    <value>0</value>
                    <newvalue>Inaccessible</newvalue>
                </mapping>
                <mapping>
                    <value>1</value>
                    <newvalue>Open</newvalue>
                </mapping>
            </mappings>
        </value_map>
        <value_map>
            <name>★ STATUS ★ Service</name>
            <mappings>
                <mapping>
                    <value>0</value>
                    <newvalue>Initiated</newvalue>
                </mapping>
                <mapping>
                    <value>1</value>
                    <newvalue>Slow</newvalue>
                </mapping>
                <mapping>
                    <value>2</value>
                    <newvalue>Start Pending</newvalue>
                </mapping>
                <mapping>
                    <value>3</value>
                    <newvalue>Leaning Pause</newvalue>
                </mapping>
                <mapping>
                    <value>4</value>
                    <newvalue>Continue Pending</newvalue>
                </mapping>
                <mapping>
                    <value>5</value>
                    <newvalue>Stop Pending</newvalue>
                </mapping>
                <mapping>
                    <value>6</value>
                    <newvalue>Stopped</newvalue>
                </mapping>
                <mapping>
                    <value>7</value>
                    <newvalue>Unknown</newvalue>
                </mapping>
                <mapping>
                    <value>255</value>
                    <newvalue>Unknown</newvalue>
                </mapping>
            </mappings>
        </value_map>
    </value_maps>
</zabbix_export>
