DX Unified Infrastructure Management

 View Only
  • 1.  RESTMon Schema for Temperature on XtremIO

    Posted Aug 16, 2019 09:15 AM

    This metric node-fp-temperature-state is what I am attempting to get with the restmon probe from an xtremIO device.

     

    node-fp-temperature-state

    Indicates the temperature sensor reading for above normal temperatures. Failover is triggered at high threshold.

    Values:

     normal - Whenever the temperature level is below sc_fp_temperature_high_warning_threshold

     warning - Whenever the temperature level is between sc_fp_temperature_high_warning_threshold AND sc_fp_temperature_high_critical_threshold

     high - Whenever the temperature level is above sc_fp_temperature_high_critical_threshold

     invalid - Whenever PM fails to read the sensor for five consecutive attempts (reading every 30 seconds), or five consecutive readings are out of the expected temperature range

     

     

    I need to use basic auth (username and password) and I can't find an example in any of the schema files where basic auth is used with a username and password. Here is my small schema file below you can see in bold i added the addedProfileFields for username and password, would this be the correct setup so that I can use that username and password with the basic auth?

     

    "storage-controllers": {

                                    "calculated_methods": [

                                                    {

                                                                   

                                                    }

                                    ],

                                    "addedProfileFields": [{

                                                                    "name": "username",

                                                                    "value": "",

                                                                    "type": "text",

                                                                    "label": "Username"

                                                    },

                                                    {

                                                                    "name": "password",

                                                                    "value": "",

                                                                    "type": "password",

                                                                    "label": "Password"

                                                    }],

                                    "urls": [

                                                    {

                                                                    "xml_ns": "",

                                                                    "src": "",

                                                                    "var": "",

                                                                    "id": "nodefptemp",

                                                                    "url": "/api/json/v2/types/storage-controllers/1"

                                                    }

                                    ],

                                    "definition": {

                                                    "resource_category": null,

                                                    "defaults": {

                                                                    "port":80,

                                                                    "interval": 10,

                                                                    "httptimeout": 30000

                                                    },

                                                    "auth": "basic",

                                                    "xml_ns": "",

                                                    "name": "storage-controllers",

                                                    "type": "https"

                                    },

                                    "metrics": [

                                                    {

                                                                    "xml_ns": "",

                                                                    "attributes": {

                                                                                    "uim": {

                                                                                                    "defaultpublishing": "true",

                                                                                                    "qos_name": "QOS_NODE_FP_TEMP_STATE",

                                                                                                    "qos_desc": "State Value",

                                                                                                    "qos_abbr": "State",

                                                                                                    "metric_type": "1:12",

                                                                                                    "qos_unit": "State",

                                                                                                    "source": "%hostname",

                                                                                                    "target": "%urlid"

                                                                                    }

                                                                    },

                                                                    "value": "$.main.temp",

                                                                    "url": "1",

                                                                    "group": "storage-controllers"

                                                    }

                                    ]

                    }

    }

     

     

     

    Second using the  SUPPORTED_CI_METRIC_TYPES spreadsheet and the unit_type "State" is what I am using here, is this possible with the metric state that the xtremIO api is providing for this endpoint. It produces either the state normal, warning, high, or invalid. With this schema setup will those state be produced as the QOS_metric?



    ------------------------------
    IT Administrator
    ------------------------------


  • 2.  RE: RESTMon Schema for Temperature on XtremIO

    Posted Aug 16, 2019 09:33 AM
    don't really know about writing json files but
    restmon supported authentication mechanism is: basic; digest; ntlm; token; bearer; urltoken; Outh2

    using restmon_sample_schemas-1.12.zip at the online archive for reference 
    Download from a browser, not from within DX IM / UIM

    the elasticsearch json uses 'basic' and doesn't have a user name. 
    marklogic has the same user password lines as your example and it is using 'digest' 
    so perhaps, your json should be set for digest instead of basic.

    ------------------------------
    Support Engineer
    Broadcom
    ------------------------------



  • 3.  RE: RESTMon Schema for Temperature on XtremIO

    Posted Aug 19, 2019 09:37 AM
    David,

    I was using both of your referenced as examples and that's why my example has the same username and password fields as the "mark logic" schema file does. I can try that though setting it to digest and seeing if that works.

    Am I correct in assume whatever I name the QOS in my schema is the QOS I should be searching for when I try to see if its writing anything to the QOS table correct?

    ------------------------------
    IT Administrator
    ------------------------------



  • 4.  RE: RESTMon Schema for Temperature on XtremIO

    Broadcom Employee
    Posted Aug 19, 2019 04:38 PM
    Edited by Chris Klug Aug 19, 2019 04:40 PM
    Hi Robert,

    To start, here's a link to the RESTmon documentation, it has some decent information:  https://docops.ca.com/ca-unified-infrastructure-management-probes/ga/en/alphabetical-probe-articles/monitor-technologies-using-restmon-probe.

    The elasticsearch schema uses basic authentication.  I don't think you need to specifically have username/password fields defined for basic.  

    "definition": {
    "node": "",
    "resource_category": null,
    "defaults": {
    "port": 9200,
    "interval": 60,
    "httptimeout": 30000
    },
    "auth": "basic",
    "xml_ns": "",
    "name": "elasticsearch",
    "type": "http"
    },

    Next - you'll want to create a conversion for the node-fp-temperature-state field since UIM doesn't store strings. If you look at the cluster status field in the elasticsearch schema (about line 159) it has the conversion format you're after:

    "conversion": "green:0, yellow:1, red:2, Default:-999"

    You are correct that the QOS name in your schema will be metric name in UIM.  Try to use something that is easily recognizable such as "QOS_XIO_NODE_FP_TEMP_STATE".  

    I would make "qos_abbr" and "qos_unit' the same - "State"

    Hope this helps.
    Chris


  • 5.  RE: RESTMon Schema for Temperature on XtremIO

    Posted Aug 20, 2019 11:00 AM
    @Chris Klug

    Thanks for the document link - this is what I have been using.

    Here is my second attempt yesterday after looking over exactly what you had recommended- However I see the response of 200 in the logs. However in the USM when I go to the hostname of the xtremio device I configured I and choose it and then choose metrics I don't see RESTMon under any of the choices to that I can actually view the metric to validate its collecting:

    Below is my schema:


    {
    	"xtremio": {
    		"calculated_methods": [
    			{
    				
    			}
    		],
    		"urls": [
    			{
    				"xml_ns": "",
    				"src": "",
    				"var": "",
    				"id": "nodefptemp",
    				"url": "/api/json/v2/types/storage-controllers/1"
    			}
    		],
    		"definition": {
    			"resource_category": null,
    			"defaults": {
    				"port":443,
    				"interval": 90,
    				"httptimeout": 30000
    			},	
    			"auth": "basic",
    			"xml_ns": "",
    			"name": "xtremio",
    			"type": "https"
    		},
    		"metrics": [
    			{
    				"xml_ns": "",
    				"attributes": {
    					"uim": {
    						"defaultpublishing": "true",
    						"qos_name": "QOS_XIO_NODE_FP_TEMP_STATE",
    						"qos_desc": "State Value",
    						"qos_abbr": "State",
    						"metric_type": "1:12",
    						"qos_unit": "State",
    						"source": "%hostname",
    						"target": "$['name']%//%%profile",
    						"conversion": "normal:0, warning:1, high:2, invalid:-999"
    					}
    				},
    				"value": "$['node-fp-temperature-state']",
    				"url": "nodefptemp",
    				"group": "xtremio"
    			}
    		]
    	}
    }


    ------------------------------
    IT Administrator
    ------------------------------



  • 6.  RE: RESTMon Schema for Temperature on XtremIO

    Posted Aug 20, 2019 11:26 AM
    Here is my log file:

    2019-08-20 11:22:03 INFO ProfileHandler - Read processProfile prd_xtremio~~12188~~xtremio settings.
    2019-08-20 11:22:03 INFO ProfileHandler - Start processProfile prd_xtremio~~12188~~xtremio interval: 90 seconds
    2019-08-20 11:22:03 INFO DataCollector - [Start , CollectAllDataAndInsertIntoDB for , prd_xtremio~~12188~~xtremio]{}{}
    2019-08-20 11:22:03 DEBUG RestAPICall - Start RestAPICall https://xioms01:443/api/json/v2/types/storage-controllers/1
    2019-08-20 11:22:03 DEBUG RestAPICall - Finish RestAPICall https://xioms01:443/api/json/v2/types/storage-controllers/1 status: 200 time: 244 milliseconds
    2019-08-20 11:22:03 INFO DataCollector - prd_xtremio~~12188~~xtremio data rowcount: 1
    2019-08-20 11:22:03 INFO DataCollector - CollectAllDataAndInsertIntoDB for prd_xtremio~~12188~~xtremio finished in 258 milliseconds
    2019-08-20 11:22:03 INFO ProfileHandler - Load metric data for processing prd_xtremio~~12188~~xtremio
    2019-08-20 11:22:03 INFO ProfileHandler - Loaded metric data for processing prd_xtremio~~12188~~xtremio time: 19 milliseconds
    2019-08-20 11:22:03 INFO ProfileHandler - Start process metric data prd_xtremio~~12188~~xtremio
    2019-08-20 11:22:03 DEBUG ParserUtil - prd_xtremio~~12188~~xtremio parsing for metric path values of $['node-fp-temperature-state']
    2019-08-20 11:22:03 DEBUG ParserUtil - prd_xtremio~~12188~~xtremio Parsing for metric path values using $['node-fp-temperature-state'] found 1 metric path value(s)
    2019-08-20 11:22:03 DEBUG ParserUtil - prd_xtremio~~12188~~xtremio parsing for metric path values of true
    2019-08-20 11:22:03 DEBUG ParserUtil - prd_xtremio~~12188~~xtremio parsing for metric path values of QOS_XIO_NODE_FP_TEMP_STATE
    2019-08-20 11:22:03 DEBUG ParserUtil - prd_xtremio~~12188~~xtremio parsing for metric path values of State Value
    2019-08-20 11:22:03 DEBUG ParserUtil - prd_xtremio~~12188~~xtremio parsing for metric path values of State
    2019-08-20 11:22:03 DEBUG ParserUtil - prd_xtremio~~12188~~xtremio parsing for metric path values of 1:12
    2019-08-20 11:22:03 DEBUG ParserUtil - prd_xtremio~~12188~~xtremio parsing for metric path values of State
    2019-08-20 11:22:03 DEBUG ParserUtil - prd_xtremio~~12188~~xtremio parsing for metric path values of %hostname
    2019-08-20 11:22:03 DEBUG ParserUtil - prd_xtremio~~12188~~xtremio Parsing for metric path values using %hostname found 1 metric path value(s)
    2019-08-20 11:22:03 DEBUG ParserUtil - prd_xtremio~~12188~~xtremio parsing for metric path values of $['name']%//%%profile
    2019-08-20 11:22:03 DEBUG ParserUtil - prd_xtremio~~12188~~xtremio Parsing for metric path values using $['name']%//%%profile found 1 metric path value(s)
    2019-08-20 11:22:03 DEBUG ParserUtil - prd_xtremio~~12188~~xtremio parsing for metric path values of normal:0, warning:1, high:2, invalid:-999
    2019-08-20 11:22:03 INFO ProfileHandler - Status: process metric data for prd_xtremio~~12188~~xtremio time: 16 milliseconds
    2019-08-20 11:22:03 INFO ProfileHandler - prd_xtremio~~12188~~xtremio uim_metrics rowcount: 1
    2019-08-20 11:22:03 INFO ProfileHandler - Load calculated metric data for processing prd_xtremio~~12188~~xtremio
    2019-08-20 11:22:03 INFO ProfileHandler - Loaded calculated metric data for processing prd_xtremio~~12188~~xtremio time: 2 milliseconds
    2019-08-20 11:22:03 INFO ProfileHandler - Start process calculated metric data prd_xtremio~~12188~~xtremio
    2019-08-20 11:22:03 INFO ProfileHandler - Status: process calculated metric data for prd_xtremio~~12188~~xtremio time: 0 milliseconds
    2019-08-20 11:22:03 INFO ProfileHandler - prd_xtremio~~12188~~xtremio uim_metrics rowcount after processing calculated metrics: 1
    2019-08-20 11:22:03 INFO UimPublisher - Start Send Metric Data prd_xtremio~~12188~~xtremio
    2019-08-20 11:22:03 INFO UimPublisher - Status: Probename: prd_xtremio~~12188~~xtremio end of run sendqos: 0 count
    2019-08-20 11:22:03 DEBUG BaselineEngineAlarmHandler - No alarm definitions to update.
    2019-08-20 11:22:03 INFO UimPublisher - Status: Probename: prd_xtremio~~12188~~xtremio end of run sendqosdefinition: 0 count
    2019-08-20 11:22:03 DEBUG UimPublisher - Status: setQOSdef size: 0
    2019-08-20 11:22:03 INFO UimPublisher - Status: Send Metric Data for prd_xtremio~~12188~~xtremio time: 6 milliseconds​

    ------------------------------
    IT Administrator
    ------------------------------



  • 7.  RE: RESTMon Schema for Temperature on XtremIO

    Posted Oct 02, 2019 07:38 AM
    Hi Robert,
    How did you manage to enter the username and password?
    I specified also: 
    "auth" : "basic",
    but when going into MCS, I dont't see any logon field in my mcs setup profile.
    The only difference is that I try to validate:
    http://uimserver/rest/hubs
    and that I need to use:
    "type": "http"
    Thanks, Luc