Skip to content

Commit

Permalink
Merge cfad0be into 92d5698
Browse files Browse the repository at this point in the history
  • Loading branch information
pratid committed May 14, 2015
2 parents 92d5698 + cfad0be commit daeb755
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 51 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ For more information, please refer to the description of Monitoring GE in

## Releases

[FIWARE 3.5.2 (R6)][release_3_5_2_ref]

* ngsi_event_broker version 1.3.2
* ngsi_adapter version 1.1.5

[FIWARE 3.5.2 (R5)][release_3_5_2_ref]

* ngsi_event_broker version 1.3.2
Expand Down Expand Up @@ -55,7 +60,7 @@ For more information, please refer to the description of Monitoring GE in

## License

(c) 2013-2014 Telefónica I+D, Apache License 2.0
(c) 2013-2015 Telefónica I+D, Apache License 2.0

[fiware_catalogue_monitoring_ref]:
http://catalogue.fiware.org/enablers/monitoring-ge-fiware-implementation
Expand Down
4 changes: 4 additions & 0 deletions ngsi_adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ two components: probe data and optional performance data.

## Changelog

Version 1.1.5

* Neutron supported in quantum-related parsers

Version 1.1.4

* Add more attributes to region.js parser (required by ODC 2.4)
Expand Down
6 changes: 6 additions & 0 deletions ngsi_adapter/script/build/files/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
fiware-monitoring-ngsi-adapter (1.1.5) precise; urgency=low

* Neutron supported in quantum-related parsers

-- Telefónica I+D <opensource@tid.es> Thu, 14 May 2015 15:00:00 +0200

fiware-monitoring-ngsi-adapter (1.1.4) precise; urgency=low

* Added more attributes to region.js parser (required by ODC 2.4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ if [ $1 -eq 0 ]; then
fi

%changelog
* Thu May 14 2015 Telefónica I+D <opensource@tid.es> 1.1.5-1
- Neutron supported in quantum-related parsers

* Thu May 07 2015 Telefónica I+D <opensource@tid.es> 1.1.4-1
- Add more attributes to region.js parser (required by ODC 2.4)

Expand Down
1 change: 1 addition & 0 deletions ngsi_adapter/src/lib/parsers/check_neutron_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ var nagios = require('./common/nagios');

// Information about the status of the service quantum-server
// PROCS OK: 4 processes with command name 'neutron-server'|(null)
// DEPRECATED: use 'check_quantum_server.js' instead
var parser = Object.create(nagios.parser);
parser.getContextAttrs = function(probeEntityData) {
var data = probeEntityData.data.split('\n')[0];
Expand Down
23 changes: 11 additions & 12 deletions ngsi_adapter/src/lib/parsers/check_quantum_dhcp_agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@ var nagios = require('./common/nagios');
var parser = Object.create(nagios.parser);
parser.getContextAttrs = function(probeEntityData) {
var data = probeEntityData.data.split('\n')[0];
var attrs = { quantum_dhcp_agent: 0};
var attrs = { quantum_dhcp_agent: 0 };
var items = data.split(':');
if ((items.length)>0 ) {
if (items[1].indexOf("quantum-dhcp-agent") != -1){
if(items[0].indexOf("PROCS OK") !=-1){
attrs.quantum_dhcp_agent=1
}
else{
attrs.quantum_dhcp_agent=0
}
}
}
else{
if (items.length > 0) {
if (items[1].match(/(quantum|neutron)-dhcp-agent/)) {
if (items[0].indexOf("PROCS OK") != -1) {
attrs.quantum_dhcp_agent = 1;
} else {
attrs.quantum_dhcp_agent = 0;
}
}
} else {
throw new Error('No valid quantum-dhcp-agent data found');
}
return attrs;
};

exports.parser = parser;
23 changes: 11 additions & 12 deletions ngsi_adapter/src/lib/parsers/check_quantum_l3_agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@ var nagios = require('./common/nagios');
var parser = Object.create(nagios.parser);
parser.getContextAttrs = function(probeEntityData) {
var data = probeEntityData.data.split('\n')[0];
var attrs = { quantum_l3_agent: 0};
var attrs = { quantum_l3_agent: 0 };
var items = data.split(':');
if ((items.length)>0 ) {
if (items[1].indexOf("quantum-l3-agent") != -1){
if(items[0].indexOf("PROCS OK") !=-1){
attrs.quantum_l3_agent=1
}
else{
attrs.quantum_l3_agent=0
}
}
}
else{
if (items.length > 0) {
if (items[1].match(/(quantum|neutron)-l3-agent/)) {
if (items[0].indexOf("PROCS OK") != -1) {
attrs.quantum_l3_agent = 1;
} else {
attrs.quantum_l3_agent = 0;
}
}
} else {
throw new Error('No valid quantum-l3-agent data found');
}
return attrs;
};

exports.parser = parser;
23 changes: 11 additions & 12 deletions ngsi_adapter/src/lib/parsers/check_quantum_metadata_agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@ var nagios = require('./common/nagios');
var parser = Object.create(nagios.parser);
parser.getContextAttrs = function(probeEntityData) {
var data = probeEntityData.data.split('\n')[0];
var attrs = { quantum_metadata_agent: 0};
var attrs = { quantum_metadata_agent: 0 };
var items = data.split(':');
if ((items.length)>0 ) {
if (items[1].indexOf("quantum-metadata-agent") != -1){
if(items[0].indexOf("PROCS OK") !=-1){
attrs.quantum_metadata_agent=1
}
else{
attrs.quantum_metadata_agent=0
}
}
}
else{
if (items.length > 0) {
if (items[1].match(/(quantum|neutron)-metadata-agent/)) {
if (items[0].indexOf("PROCS OK") != -1) {
attrs.quantum_metadata_agent = 1;
} else {
attrs.quantum_metadata_agent = 0;
}
}
} else {
throw new Error('No valid quantum-metadata-agent data found');
}
return attrs;
};

exports.parser = parser;
25 changes: 12 additions & 13 deletions ngsi_adapter/src/lib/parsers/check_quantum_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@ var nagios = require('./common/nagios');
var parser = Object.create(nagios.parser);
parser.getContextAttrs = function(probeEntityData) {
var data = probeEntityData.data.split('\n')[0];
var attrs = { quantum_server: 0};
var attrs = { quantum_server: 0 };
var items = data.split(':');
if ((items.length)>0 ) {
if (items[1].indexOf("quantum-server") != -1){
if(items[0].indexOf("PROCS OK") !=-1){
attrs.quantum_server=1
}
else{
attrs.quantum_server=0
}
}
}
else{
throw new Error('No valid quantum-server data found..');
if (items.length > 0) {
if (items[1].match(/(quantum|neutron)-server/)) {
if (items[0].indexOf("PROCS OK") != -1) {
attrs.quantum_server = 1;
} else {
attrs.quantum_server = 0;
}
}
} else {
throw new Error('No valid quantum-server data found');
}
return attrs;
};

exports.parser = parser;
2 changes: 1 addition & 1 deletion ngsi_adapter/src/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.1.4",
"version": "1.1.5",
"name": "ngsi_adapter",
"main": "lib/adapter.js",
"description": "Generic NGSI Probe Adapter",
Expand Down

0 comments on commit daeb755

Please sign in to comment.