From May 2018

Health Check API Pattern for Cloud/NonCloud End to End Monitoring


You have a cloud stack with several subsystems such as databases, integration hub, containers, application servers and more…, and you’d like to be confident that the whole stack is running well and end users are not suffering any issues.

The Health Check API pattern can help you. Just expose an /health endpoint anywhere in your stack (for instance in an Oracle Application Container), secure it if necessary and implement a logic consisting in requesting resources to the other of stack components. For example if you have a database, a bus in the cloud and a bus on premises make the following:

  • expose a rest service in the database that queries an important table with where clause that doesn’t retrieve data
  • expose a rest/soap endpoint in your cloud bus that calls an important endpoint in your on-premises bus

Now, every time you request the /health endpoint you can retrieve an OK in case all the underlying subsystems called were fine or a KO plus an error message explaining which of the subsystems failed.

Execute periodically the /heath endpoint from your preferred mon storing engine for instance the opcHealth for iOS App, Oracle Management Cloud or other.

See also this post.

Enjoy 😉

 

opcHealth version 2.1 just released in the Apple Store


The new version discovers more cloud services such as MCS and OAC. See details here and here

One of the new features is the capability for configuring Monitors (health check endpoints). A monitor is a URL that the App checks every 30 seconds in order to verify the health of your stack.

IMG_CE32E504F96F-1

The Monitors configuration is a json structure explained here that can be set in the “config” tab of the App

IMG_1DDC0C2051E9-1

Our recommendation is that you implement this Monitors according to the Health Check API pattern.

Enjoy 😉

Madrid-Segovia MTB 2018 con la Specialized Turbo Levo FSR Expert 6 Fattie: Consumo real de batería


Tramo Madrid-Cercedilla

Consumo de batería: 18%

Tiempo: 04:26:07

Tramo Cercedilla-Segovia

Consumo de batería: 68%

Tiempo: 03:48:20

Comentarios

Poco consumo en primer tramo, he llevado la bici apagada mucho tiempo pero me ha pasado factura, he tenido un calambre en cada pierna. El segundo tramo he tirado más de motor. Casi todos los tramos en eco excepto repechos y zonas con barro en modo trail. Turbo nada.

Batería restante al final de la prueba: 14%

Configuración:

Eco al 10%

Trail al 20%

Turbo al 30%

Peso bici completo (bidón, herramienta, líquido anti-pinchazos,..) 24,5Kg
Peso Ciclista: 64Kg

Enjoy 😉

Ver también esto

Oracle IdCS Tips Part III: Validating user password with the REST API


// jmu, may 2018

var express = require('express');

var app = express();

var https = require('https');

var fs = require('fs');

// this data comes from your IdCS administrator

const client_id = "7x7x38873x3348xxxxe242817x0xx005"

const secret = "8x1xxxxx-x87x-48x7-xxx6-1x2xxxx80x3x"

const idcsHost = 'idcs-xxxxxxxxxx.identity.oraclecloud.com'

//

var userJSONData = {

"mappingAttribute": "userName",

"mappingAttributeValue": "alextorrijo",

"password": "P3rr301234",

"schemas": [

"urn:ietf:params:scim:schemas:oracle:idcs:PasswordAuthenticator"

]

};

var userData = JSON.stringify(userJSONData);

var resultado = ""

const tokenData = "grant_type=client_credentials&scope=urn:opc:idm:__myscopes__";

var token = ""

var credentials = Buffer.from(client_id + ":" + secret).toString('base64');

var token_options = {

host: idcsHost,

port: 443,

path: '/oauth2/v1/token',

method: 'POST',

headers: {

"Content-Type": "application/x-www-form-urlencoded",

"Authorization": "Basic "+ credentials,

"Accept": "application/json, text/plain, */*"

}

};

app.get('/', function (req, res) {

var x = https.request(token_options,function(res){

res.on('data',function(data){

token = JSON.parse(data).access_token;

fs.appendFile('logfile.log', token + '\r\n', function(err){;});

var validate_pwd_options = {

host: idcsHost,

port: 443,

path: '/admin/v1/PasswordAuthenticator',

method: 'POST',

headers: {

"Content-Type": "application/scim+json",

"Authorization": "Bearer "+ token

}

};

var y = https.request(validate_pwd_options,function(res){

res.on('data',function(data){

fs.appendFile('logfile.log', data + '\r\n', function(err){;});

resultado = data

});

});

y.write(userData);

y.end();

});

});

x.write(tokenData);

x.end();

res.send(resultado);

});

app.listen(3456, function () {

console.log('Example app listening on port 3456!');

});

 

See also related posts here and here
Enjoy 😉

 

Automating Start/Stop for Oracle Cloud Instances with Developer Cloud Service Builds


Shall you need automate the procedure of start/stop/restart instances for several reasons? DevCS can help you to make it easily.

Create a build and follow the steps in this pictures, in 5 minutes you’ll have your automation ready to run.

This slideshow requires JavaScript.

Enjoy 😉

DBCS 12.2.0.1 (12.2.0.1.180116) Automatic and on-demand Backup Fail


SYMTHOMS

  1. Automatic backups are not performed
  2. Backups fail either launched manually from Oracle Database Cloud Service page or from rman command line:
RMAN> connect target

connected to target database: ORCL (DBID=1502300872)

using target database control file instead of recovery catalog

RMAN> backup device type sbt current controlfile;

Starting backup at 04-MAY-18

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of backup command at 05/04/2018 21:20:17

ORA-19554: error allocating device, device type: SBT_TAPE, device name: 

ORA-27023: skgfqsbi: media manager protocol error

ORA-19511: non RMAN, but media manager or vendor specific failure, error text:

   KBHS-00715: HTTP error occurred 'oracle-error'

KBHS-00712: ORA-29024 received from local HTTP service

FOUND IN

DBCS EE 12.2.0.1 180116

DBCS EE 12.2.0.2 180116

DIAGNOSTICS


[root@BRACDBPRO ~]# tail -f /var/opt/oracle/log/ORCL/obkup/obkup.log

2018-05-04 21:00:23 - cmd took 0 seconds

2018-05-04 21:00:23 - Output from cmd perl -p -i -e 's/^.*OBKUP.*

//g' /etc/motd run on localhost  is:

2018-05-04 21:00:23 - cmd took 0 seconds

2018-05-04 21:00:23 - Output from cmd echo -e '*** OBKUP::ERROR INFO ***

OBKUP::ERROR Cannot complete the Archivelogs Backup to Cloud Storage

OBKUP::ERROR KBHS-00715 HTTP CONNECTION ERROR

OBKUP::ERROR An http error was detected please verify your connectivity

*** OBKUP::ERROR END ***' >> /etc/motd run on localhost  is:

2018-05-04 21:00:23 - cmd took 0 seconds



SOLUTION THAT WORKED FOR ME

vi /u01/app/oracle/product/12.2.0/dbhome_1/dbs/opcORCL.ora

OPC_HOST=https://mxlxxhxtxlsxntxrnxtxxnxl.eu.storage.oraclecloud.com/v1/Storage-mxlxxhxtxlsxntxrnxtxxnxl

OPC_WALLET='LOCATION=file:/u01/app/oracle/admin/ORCL/opc_wallet CREDENTIAL_ALIAS=alias_opc'

OPC_CONTAINER=BRACDBPRO

# jmu 04/05/2018

_OPC_VALIDATE_CERT=TRUE

Perform whatever backup operation to put “things on his place”

[oracle@BRACDBPRO ~]$ rman

Recovery Manager: Release 12.2.0.1.0 - Production on Fri May 4 22:58:34 2018

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect target

connected to target database: ORCL (DBID=1502300872)

RMAN> backup device type sbt current controlfile;

Starting backup at 04-MAY-18

using target database control file instead of recovery catalog

allocated channel: ORA_SBT_TAPE_1

channel ORA_SBT_TAPE_1: SID=1188 device type=SBT_TAPE

channel ORA_SBT_TAPE_1: Oracle Database Backup Service Library VER=12.2.0.1

allocated channel: ORA_SBT_TAPE_2

channel ORA_SBT_TAPE_2: SID=1173 device type=SBT_TAPE

channel ORA_SBT_TAPE_2: Oracle Database Backup Service Library VER=12.2.0.1

allocated channel: ORA_SBT_TAPE_3

channel ORA_SBT_TAPE_3: SID=53 device type=SBT_TAPE

channel ORA_SBT_TAPE_3: Oracle Database Backup Service Library VER=12.2.0.1

allocated channel: ORA_SBT_TAPE_4

channel ORA_SBT_TAPE_4: SID=1186 device type=SBT_TAPE

channel ORA_SBT_TAPE_4: Oracle Database Backup Service Library VER=12.2.0.1

allocated channel: ORA_SBT_TAPE_5

channel ORA_SBT_TAPE_5: SID=51 device type=SBT_TAPE

channel ORA_SBT_TAPE_5: Oracle Database Backup Service Library VER=12.2.0.1

channel ORA_SBT_TAPE_1: starting full datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

including current control file in backup set

channel ORA_SBT_TAPE_1: starting piece 1 at 04-MAY-18

channel ORA_SBT_TAPE_1: finished piece 1 at 04-MAY-18

piece handle=2pt235di_1_1 tag=TAG20180504T225858 comment=API Version 2.0,MMS Version 12.2.0.1

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:03

Finished backup at 04-MAY-18

Starting Control File and SPFILE Autobackup at 04-MAY-18

piece handle=c-1502300872-20180504-0c comment=API Version 2.0,MMS Version 12.2.0.1

Finished Control File and SPFILE Autobackup at 04-MAY-18

RMAN> 

Enjoy 😉