Hc_md_rpss_info

Команда для просмотра информации о кластере Mediator (RPSS).

Аналог команды в CoCon:

cluster/mediator/<CLUSTER>/properties/rpss/info

Шаблон URL-запроса:

http://host:port/commands/md_rpss_info

Коды ответа:

  • 200 - успех;
  • 404 - ошибка.

XML-схема:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="md_rpss_info">
    <xs:annotation>
        <xs:documentation xml:lang="en">
            Get properties of Mediator cluster (RPSS).
            Usage: http://server:9999/commands/md_rpss_info
            Copyright (c) 2014, Eltex. All rights reserved.
        </xs:documentation>
    </xs:annotation>

    <xs:include schemaLocation="error.xsd" />
    <xs:include schemaLocation="ecm_common.xsd" />

<!-- Types -->

    <!-- dbConnection value -->
    <!--<xs:simpleType name="dbConnectionsType">-->
        <!--<xs:restriction base="xs:string">-->
            <!--<xs:pattern value="(name=.+;provider=[a-zA-Z]+;database=[a-zA-Z0-9$_]{1,64};user=.{1,16};password=.+;host=((([0-9]{1,3}\.){3}[0-9]{1,3})|((([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])));port=[0-9]{1,5},?)*" />-->
        <!--</xs:restriction>-->
    <!--</xs:simpleType>-->

    <!-- alarmPanelSignals value -->
    <!--<xs:simpleType name="alarmPanelSignalsType">-->
        <!--<xs:restriction base="xs:string">-->
            <!--<xs:pattern value="((critical|major|warning|indeterminate):(([0-9]{1,4}:[0-9]+:[0-9]+:[0-9]+)|default);)*" />-->
        <!--</xs:restriction>-->

    <!-- alarmPanel value -->
    <!--<xs:simpleType name="alarmPanelType">-->
        <!--<xs:restriction base="xs:string">-->
            <!--<xs:pattern value="((local:(any|((([0-9]{1,3}\.){3}[0-9]{1,3})|((([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])))):[0-9]{1,5}){1};(remote:((([0-9]{1,3}\.){3}[0-9]{1,3})|((([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9]))):[0-9]{1,5}){1})*" />-->
        <!--</xs:restriction>-->
    <!--</xs:simpleType>-->

    <!-- Options type -->
    <xs:complexType name="mdRPSSOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="alarmNotifyCacheSize" type="positiveIntegerType" use="optional" />
                <xs:attribute name="alarmNotifyInterval" type="positiveIntegerType" use="optional" />
                <xs:attribute name="alarmPanel" type="xs:string" use="optional" />
                <xs:attribute name="alarmPanelSignals" type="xs:string" use="optional" />
                <xs:attribute name="collectInterval" type="positiveIntegerType" use="optional" />
                <xs:attribute name="collectProcPriority" type="procPriorityType" use="optional" />
                <xs:attribute name="dbConnections" type="xs:string" use="optional" />
                <xs:attribute name="defaultAlarmRowLimit" type="positiveIntegerType" use="optional" />
                <xs:attribute name="exportEmptyReports" type="xs:boolean" use="optional" />
                <xs:attribute name="exportProcPriority" type="procPriorityType" use="optional" />
                <xs:attribute name="parallelExportStatistics" type="xs:boolean" use="optional" />
                <xs:attribute name="snmpAgentEnable" type="xs:boolean" use="optional" />
                <xs:attribute name="statProcessingCount" type="positiveIntegerType" use="optional" />
                <xs:attribute name="maxClearedAlarms" type="positiveIntegerType" use="optional" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

<!-- Types -->

<!-- Root -->

    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:all minOccurs="1" maxOccurs="1">
                <xs:element name="request" minOccurs="1" maxOccurs="1">
                    <xs:complexType>
                        <xs:all minOccurs="1" maxOccurs="1">
                            <xs:element name="nc_options" type="ncInfoInType" minOccurs="1"
                                        maxOccurs="1" />
                        </xs:all>
                    </xs:complexType>
                </xs:element>
            </xs:all>
        </xs:complexType>
    </xs:element>
    <!-- in -->

    <!-- out -->
    <xs:element name="out">
        <xs:complexType>
            <xs:choice>
                <xs:element name="result" minOccurs="1" maxOccurs="1">
                    <xs:complexType>
                        <xs:all minOccurs="1" maxOccurs="1">
                            <xs:element name="nc_options" type="ncInfoOutType" minOccurs="1"
                                        maxOccurs="1" />
                        </xs:all>
                    </xs:complexType>
                </xs:element>
                <xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1" />
            </xs:choice>
        </xs:complexType>
    </xs:element>
    <!-- out -->

<!-- Root -->

</xs:schema>
CODE

Запрос значений всех доступных свойств:

http://192.168.1.21:9999/commands/md_rpss_info

<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="md_rpss_info.xsd">
    <request>
        <nc_options cluster="md1" node="md1@ecss1" />
    </request>
</in>
CODE

Ответ:

<?xml version="1.0"?>
<out
	xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="md_rpss_info.xsd">
	<result>
		<nc_options>
			<cluster name="md1">
				<options xs:type="mdRPSSOptionsType"/>
			</cluster>
			<node name="md1@ecss1">
				<options xs:type="mdRPSSOptionsType" statProcessingCount="5" snmpAgentEnable="false" parallelExportStatistics="false" maxClearedAlarms="10000" exportProcPriority="normal" exportEmptyReports="false" defaultAlarmRowLimit="25" dbConnections="name=stat_db;provider=mysql;database=ecss_statistics;user=statistics;password=statistics;host=192.168.1.71;port=3306" collectProcPriority="normal" collectInterval="10" alarmPanelSignals="" alarmPanel="" alarmNotifyInterval="10" alarmNotifyCacheSize="30"/>
			</node>
		</nc_options>
	</result>
</out>
CODE

Hc_md_rpss_set

Команда для изменения свойств кластера Mediator (RPSS)

Аналог команды в CoCon:

cluster/mediator/<CLUSTER>/properties/rpss/set
Шаблон URL-запроса:

http://server:9999/commands/md_rpss_set

Коды ответа:

  • 200 - успех;
  • 404 - ошибка.

XML-схема:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="md_rpss_set">
    <xs:annotation>
        <xs:documentation xml:lang="en">
            Set properties of Mediator cluster (RPSS).
            Usage: http://server:9999/commands/md_rpss_set
            Copyright (c) 2014, Eltex. All rights reserved.
        </xs:documentation>
    </xs:annotation>

    <xs:include schemaLocation="error.xsd" />
    <xs:include schemaLocation="ecm_common.xsd" />

<!-- Types -->

    <!-- dbConnection value -->
    <xs:simpleType name="dbConnectionsType">
        <xs:restriction base="xs:string">
            <xs:pattern value="(name=.+;provider=[a-zA-Z]+;database=[a-zA-Z0-9$_]{1,64};user=.{1,16};password=.+;host=((([0-9]{1,3}\.){3}[0-9]{1,3})|((([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])));port=[0-9]{1,5},?)*" />
        </xs:restriction>
    </xs:simpleType>

    <!-- alarmPanelSignals value -->
    <xs:simpleType name="alarmPanelSignalsType">
        <xs:restriction base="xs:string">
            <xs:pattern value="((critical|major|warning|indeterminate):(([0-9]{1,4}:[0-9]+:[0-9]+:[0-9]+)|default);?)*" />
        </xs:restriction>
    </xs:simpleType>

    <!-- alarmPanel value -->
    <xs:simpleType name="alarmPanelType">
        <xs:restriction base="xs:string">
            <xs:pattern value="((local:(any|((([0-9]{1,3}\.){3}[0-9]{1,3})|((([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])))):[0-9]{1,5}){1};(remote:((([0-9]{1,3}\.){3}[0-9]{1,3})|((([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9]))):[0-9]{1,5}){1})*" />
        </xs:restriction>
    </xs:simpleType>

    <!-- Options type -->
    <xs:complexType name="mdRPSSOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="alarmNotifyCacheSize" type="positiveIntegerType" use="optional" />
                <xs:attribute name="alarmNotifyInterval" type="positiveIntegerType" use="optional" />
                <xs:attribute name="alarmPanel" type="alarmPanelType" use="optional" />
                <xs:attribute name="alarmPanelSignals" type="alarmPanelSignalsType" use="optional" />
                <xs:attribute name="collectInterval" type="positiveIntegerType" use="optional" />
                <xs:attribute name="collectProcPriority" type="procPriorityType" use="optional" />
                <xs:attribute name="dbConnections" type="dbConnectionsType" use="optional" />
                <xs:attribute name="defaultAlarmRowLimit" type="positiveIntegerType" use="optional" />
                <xs:attribute name="exportEmptyReports" type="xs:boolean" use="optional" />
                <xs:attribute name="exportProcPriority" type="procPriorityType" use="optional" />
                <xs:attribute name="parallelExportStatistics" type="xs:boolean" use="optional" />
                <xs:attribute name="snmpAgentEnable" type="xs:boolean" use="optional" />
                <xs:attribute name="statProcessingCount" type="positiveIntegerType" use="optional" />
                <xs:attribute name="maxClearedAlarms" type="positiveIntegerType" use="optional" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

<!-- Types -->

<!-- Root -->

    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:all minOccurs="1" maxOccurs="1">
                <xs:element name="request" minOccurs="1" maxOccurs="1">
                    <xs:complexType>
                        <xs:all minOccurs="1" maxOccurs="1">
                            <xs:element name="nc_options" type="ncSetInType" minOccurs="1"
                                        maxOccurs="1" />
                        </xs:all>
                    </xs:complexType>
                </xs:element>
            </xs:all>
        </xs:complexType>
    </xs:element>
    <!-- in -->

    <!-- out -->
    <xs:element name="out">
        <xs:complexType>
            <xs:choice>
                <xs:element name="result" minOccurs="1" maxOccurs="1">
                    <xs:complexType>
                        <xs:all minOccurs="1" maxOccurs="1">
                            <xs:element name="nc_options" type="ncSetOutType" minOccurs="1"
                                        maxOccurs="1" />
                        </xs:all>
                    </xs:complexType>
                </xs:element>
                <xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1" />
            </xs:choice>
        </xs:complexType>
    </xs:element>
    <!-- out -->

<!-- Root -->

</xs:schema>
CODE

Пример:

Запрос: http://192.168.1.21:9999/commands/md_rpss_set

<?xml version="1.0"?>
<in
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="md_rpss_set.xsd">
    <request>
        <nc_options>
            <cluster name="md1">
                <options xs:type="mdRPSSOptionsType" alarmNotifyInterval="10" />
            </cluster>
            <node name="md1@ecss1">
                <options xs:type="mdRPSSOptionsType" dbConnections="name=test;provider=mysql;database=md_rpss_test;user=ssw;password=ssw;host=192.168.1.71;port=3306,name=test-1;provider=mysql;database=ssw;user=ssw;password=ssw;host=localhost;port=3306" alarmPanelSignals="critical:default;warning:1000:3:10:10" alarmPanel="local:any:1234;remote:localhost:6789" />
            </node>
        </nc_options>
    </request>
</in>
CODE

Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="md_rpss_set.xsd">
    <result>
        <nc_options>
            <cluster name="md1">
                <success option="alarmNotifyInterval"/>
            </cluster>
            <node name="md1@ecss1">
                <success option="alarmPanel"/>
                <success option="alarmPanelSignals"/>
                <success option="dbConnections"/>
            </node>
        </nc_options>
    </result>
</out>
CODE

Hc_md_rpss_clean

Командой удаляются установленные значения свойств кластера Mediator.

Аналог команды в CoCon:

cluster/mediator/<CLUSTER>/properties/rpss/clean

Шаблон URL-запроса:

http://server:9999/commands/md_rpss_clean

Коды ответа:

  • 200 - успех;
  • 404 - ошибка.

XML-схема:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="md_rpss_clean">
    <xs:annotation>
        <xs:documentation xml:lang="en">
            Clean property or properties of RPSS.
            Usage: http://server:9999/commands/md_rpss_clean
            Copyright (c) 2014, Eltex. All rights reserved.
        </xs:documentation>
    </xs:annotation>

    <xs:include schemaLocation="error.xsd" />
    <xs:include schemaLocation="ecm_common.xsd" />

    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:all minOccurs="1" maxOccurs="1">
                <xs:element name="request" minOccurs="1" maxOccurs="1">
                    <xs:complexType>
                        <xs:all minOccurs="1" maxOccurs="1">
                            <xs:element name="nc_options" type="ncCleanInType" minOccurs="1"
                                        maxOccurs="1" />
                        </xs:all>
                    </xs:complexType>
                </xs:element>
            </xs:all>
        </xs:complexType>
    </xs:element>
    <!-- in -->

    <!-- out -->
    <xs:element name="out">
        <xs:complexType>
            <xs:choice>
                <xs:element name="result" minOccurs="1" maxOccurs="1">
                    <xs:complexType>
                        <xs:all minOccurs="1" maxOccurs="1">
                            <xs:element name="nc_options" type="ncCleanOutType" minOccurs="1"
                                        maxOccurs="1"/>
                        </xs:all>
                    </xs:complexType>
                </xs:element>
                <xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1" />
            </xs:choice>
        </xs:complexType>
    </xs:element>
    <!-- out -->

</xs:schema>
CODE

Примеры:

Запрос: http://192.168.1.21:9999/commands/md_rpss_clean

<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" 
    xs:noNamespaceSchemaLocation="md_rpss_clean.xsd">
    <request>
        <nc_options>
            <cluster name="md1">
                <option name="tts_realm" />
            </cluster>
            <node name="md1@ecss1">
                <option name="dbConnections" />
                <option name="alarmPanel" />
                <option name="alarmPanelSignals" />
            </node>
        </nc_options>
    </request>
</in>
CODE

Ответ:

<?xml version="1.0"?>
<out
	xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="md_rpss_clean.xsd">
	<result>
		<nc_options>
			<cluster name="md1">
				<success option="tts_realm"/>
			</cluster>
			<node name="md1@ecss1">
				<success option="alarmPanel"/>
				<success option="alarmPanelSignals"/>
				<success option="dbConnections"/>
			</node>
		</nc_options>
	</result>
</out>
CODE