SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Downloaden Sie, um offline zu lesen
Session 4 - How to debug IoT Agents
Fernando LĂłpez, Cloud & Platform Senior Expert
fernando.lopez@fiware.org
@flopezaguilar
FIWARE Foundation, e.V.
Learning Goals
§ How to diagnose common problems
§ How to test services in isolation
§ How to set-up and interpret debug
§ Configuring IoT Agents:
‱ Where are settings described and defined?
‱ How can they be overridden?
§ Adding diagnostic debug
§ Where to look for help and advice?
1
FIWARE Catalogue
22
Data/APIManagement
PublicationMonetization
Core Context Management
(Context Broker)
Context
Processing, Analysis, Visualization
Interface to
IoT, Robotics and third party systems
Deploymenttools
2
Development of
Context-aware applications
(Orion, STH-Comet,
Cygnus, Quantum Leap, Draco)
Connection to the
Internet of Things
(IDAS, OpenMTC)
Real-time
processing of
context events
(Perseo)
Handling authorization
and access control to
APIs
(Keyrock, Wilma,
AuthZForce, APInf )
Publication and
Monetization of Context
Information
(CKAN extensions, Data/API
Biz Framework, IDRA)
Creation of
Application Dashboards
(Wirecloud)
Real-time
Processing of media
streams
(Kurento)
Business Intelligence
(Knowage)
Connection to robots
(Fast RTPS,Micro XRCE-DDS)
Big Data
Context Analysis
(Cosmos)
Cloud Edge
(FogFlow)
Documents exchange
(Domibus)
Generic Scenario: IoT Sensors to FIWARE Context Data
3
§ We are using an IoT Agent to receive data
from a series of devices using a common
protocol
§ The IoT Agent must interpret the data and create
and modify NGSI data entities in the Context Broker
§ The system must react on changes of state. In this
example, changes of state of data entities must
somehow be persisted into a database using Cygnus,
but we could equally be doing some processing or
visualization.
§ In a working system is possible we would want amend
the transport or add security.
What can possibly go wrong?
§ Listening on the wrong port/resource-path/protocol
§ Check data is received on each part of the chain
§ Not paying attention to the FIWARE service headers
§ Misinterpreting received measures
§ Reading Numbers as Strings
§ Misusing localhost in a containerized environment
4
What can possibly go wrong?
§ Setting up subscriptions too narrowly
§ Provisioning services and devices incorrectly
§ Using deprecated interfaces (NGSI v1)
§ Using obsolete or incompatible Generic Enablers
5
Configuration and Provisioning
§ config.js
§ Base configuration file found in root of each enabler
§ Annotated
§ Most options switched off
§ Using Docker, you can:
§ Inject your own config.js volume
§ Override common ENVs
§ Override specific ENVs
§ Provisioning Groups and Devices
§ Further override options
6
Setting Debug
Debug options vary considerably between components:
§ Orion: -logLevel DEBUG -noCache -logForHumans
§ IoT Agents: IOTA_LOG_LEVEL=DEBUG
§ Cygnus: CYGNUS_LOG_LEVEL=DEBUG
§ Keyrock: DEBUG=idm:*
§ PEP Proxy: Amend the log_config.json file directly
7
Debugging
§ Check Services are running docker ps
Follow the logs docker logs -f fiware-iot-agent
§ PM2 Monitoring docker exec -it fiware-iot-agent pm2 monit
§ Listening to MQTT traffic docker run -it --rm --name mqtt-subscriber
--network fiware_default efrecon/mqtt-client
sub -h mosquitto -t "/#"
§ Sending dummy MQTT data docker run -it --rm --name mqtt-publisher
--network fiware_default efrecon/mqtt-client
pub -h mosquitto -m "c|1” –t
"/TEF/motion001/attrs"
8
Sanity Checks
§ Always stick to a specified version of each component
§ Check by using /version endpoints
§ Check component versions against releases
§ Read debug to see where data is/is not being retrieved
§ Initially use "idPattern": ".*" in subscriptions
§ Check the notification details such as timesSent
§ Ensure IOTA_CB_NGSI_VERSION and IOTA_AUTOCAST are set
§ Check your mapped attributes on provisioned devices
9
Add diagnostic debug by amending the source
§ git clone - grep the source code for your error message
§ git clone - amend source code - add debug - create image direct from source
- instructions in Dockerfile
docker build -t iot-agent .
§ Fork source code and amend - create image from fork
docker build -t iot-agent . 
--build-arg GITHUB_ACCOUNT=<your account> 
--build-arg GITHUB_REPOSITORY=<your repo> 
--build-arg SOURCE_BRANCH=<your branch>
§ All FIWARE projects are open-source - PRs accepted.
10
Where to get help
§ Read the Documentation
‱ https://www.fiware.org/developers/catalogue
§ Find the Source Code on GitHub
‱ https://github.com/FIWARE/catalogue
‱ Raise issues with individual enablers
§ Ask development questions on Stack Overflow
‱ https://stackoverflow.com/questions/tagged/fiware
‱ Always tag question fiware plus relevant tags
‱ Stack Overflow is a third-party site. Follow their rules of engagement:
‱ Development questions only
‱ Provide logs/evidence of your efforts
§ Use the FIWARE Q+A
‱ https://ask.fiware.org/questions
‱ Usable for non-development questions
11
Summary
§ Avoid simple problems by running basic sanity checks first
§ Test each link in the chain to diagnose your real issue
§ Setting up debug differs for each component - always check the
documentation for details
§ IoT Agents can be set up and overridden many different ways:
‱ Base config.js, injected config.js, Docker ENV overrides
‱ Device specific provisioning
§ Read the documentation on ReadTheDocs
§ If you’re still having problems, add diagnostic debug by
amending the source code and running a local image
§ Further help can be found on Ask, Stack Overflow or raising
issues on GitHub
12
Thank you!
http://fiware.org
Follow @FIWARE on Twitter
13

Weitere Àhnliche Inhalte

Was ist angesagt?

DevSecCon Singapore 2019: Workshop - Burp extension writing workshop
DevSecCon Singapore 2019: Workshop - Burp extension writing workshopDevSecCon Singapore 2019: Workshop - Burp extension writing workshop
DevSecCon Singapore 2019: Workshop - Burp extension writing workshopDevSecCon
 
DevOps in a Cloud Native World
DevOps in a Cloud Native WorldDevOps in a Cloud Native World
DevOps in a Cloud Native WorldMichael Ducy
 
Advanced Postman for Better APIs - Web Summit 2018 - Cisco DevNet
Advanced Postman for Better APIs - Web Summit 2018 - Cisco DevNetAdvanced Postman for Better APIs - Web Summit 2018 - Cisco DevNet
Advanced Postman for Better APIs - Web Summit 2018 - Cisco DevNetCisco DevNet
 
Automating Attacks Against Office365 - BsidesPDX 2016
Automating Attacks Against Office365 - BsidesPDX 2016Automating Attacks Against Office365 - BsidesPDX 2016
Automating Attacks Against Office365 - BsidesPDX 2016Karl Fosaaen
 
Open Source License Compliance with AGL
Open Source License Compliance with AGLOpen Source License Compliance with AGL
Open Source License Compliance with AGLPaul Barker
 
Operating Docker
Operating DockerOperating Docker
Operating DockerJen Andre
 
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...CloudBees
 
Exploiting XPC in AntiVirus
Exploiting XPC in AntiVirusExploiting XPC in AntiVirus
Exploiting XPC in AntiVirusCsaba Fitzl
 
The ForgeRock Deployment for Cloud Readiness
The ForgeRock Deployment for Cloud ReadinessThe ForgeRock Deployment for Cloud Readiness
The ForgeRock Deployment for Cloud ReadinessForgeRock
 
Mitigating Exploits Using Apple's Endpoint Security
Mitigating Exploits Using Apple's Endpoint SecurityMitigating Exploits Using Apple's Endpoint Security
Mitigating Exploits Using Apple's Endpoint SecurityCsaba Fitzl
 
Csaba fitzl - Mount(ain) of Bugs
Csaba fitzl - Mount(ain) of BugsCsaba fitzl - Mount(ain) of Bugs
Csaba fitzl - Mount(ain) of BugsCsaba Fitzl
 
Velociraptor - SANS Summit 2019
Velociraptor - SANS Summit 2019Velociraptor - SANS Summit 2019
Velociraptor - SANS Summit 2019Velocidex Enterprises
 
Securing your Container Environment with Open Source
Securing your Container Environment with Open SourceSecuring your Container Environment with Open Source
Securing your Container Environment with Open SourceMichael Ducy
 
Monitoring Docker Environments with Outlyer
Monitoring Docker Environments with OutlyerMonitoring Docker Environments with Outlyer
Monitoring Docker Environments with OutlyerTodd Radel
 
InSpec Workshop DevSecCon 2017
InSpec Workshop DevSecCon 2017InSpec Workshop DevSecCon 2017
InSpec Workshop DevSecCon 2017Mandi Walls
 
AWS Survival Guide
AWS Survival GuideAWS Survival Guide
AWS Survival GuideKen Johnson
 
Security Tips to run Docker in Production
Security Tips to run Docker in ProductionSecurity Tips to run Docker in Production
Security Tips to run Docker in ProductionGianluca Arbezzano
 
Kubernetes security
Kubernetes securityKubernetes security
Kubernetes securityThomas Fricke
 
20+ Ways To Bypass Your Macos Privacy Mechanisms
20+ Ways To Bypass Your Macos Privacy Mechanisms20+ Ways To Bypass Your Macos Privacy Mechanisms
20+ Ways To Bypass Your Macos Privacy MechanismsSecuRing
 

Was ist angesagt? (20)

DevSecCon Singapore 2019: Workshop - Burp extension writing workshop
DevSecCon Singapore 2019: Workshop - Burp extension writing workshopDevSecCon Singapore 2019: Workshop - Burp extension writing workshop
DevSecCon Singapore 2019: Workshop - Burp extension writing workshop
 
DevOps in a Cloud Native World
DevOps in a Cloud Native WorldDevOps in a Cloud Native World
DevOps in a Cloud Native World
 
Java Cloud and Container Ready
Java Cloud and Container ReadyJava Cloud and Container Ready
Java Cloud and Container Ready
 
Advanced Postman for Better APIs - Web Summit 2018 - Cisco DevNet
Advanced Postman for Better APIs - Web Summit 2018 - Cisco DevNetAdvanced Postman for Better APIs - Web Summit 2018 - Cisco DevNet
Advanced Postman for Better APIs - Web Summit 2018 - Cisco DevNet
 
Automating Attacks Against Office365 - BsidesPDX 2016
Automating Attacks Against Office365 - BsidesPDX 2016Automating Attacks Against Office365 - BsidesPDX 2016
Automating Attacks Against Office365 - BsidesPDX 2016
 
Open Source License Compliance with AGL
Open Source License Compliance with AGLOpen Source License Compliance with AGL
Open Source License Compliance with AGL
 
Operating Docker
Operating DockerOperating Docker
Operating Docker
 
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
 
Exploiting XPC in AntiVirus
Exploiting XPC in AntiVirusExploiting XPC in AntiVirus
Exploiting XPC in AntiVirus
 
The ForgeRock Deployment for Cloud Readiness
The ForgeRock Deployment for Cloud ReadinessThe ForgeRock Deployment for Cloud Readiness
The ForgeRock Deployment for Cloud Readiness
 
Mitigating Exploits Using Apple's Endpoint Security
Mitigating Exploits Using Apple's Endpoint SecurityMitigating Exploits Using Apple's Endpoint Security
Mitigating Exploits Using Apple's Endpoint Security
 
Csaba fitzl - Mount(ain) of Bugs
Csaba fitzl - Mount(ain) of BugsCsaba fitzl - Mount(ain) of Bugs
Csaba fitzl - Mount(ain) of Bugs
 
Velociraptor - SANS Summit 2019
Velociraptor - SANS Summit 2019Velociraptor - SANS Summit 2019
Velociraptor - SANS Summit 2019
 
Securing your Container Environment with Open Source
Securing your Container Environment with Open SourceSecuring your Container Environment with Open Source
Securing your Container Environment with Open Source
 
Monitoring Docker Environments with Outlyer
Monitoring Docker Environments with OutlyerMonitoring Docker Environments with Outlyer
Monitoring Docker Environments with Outlyer
 
InSpec Workshop DevSecCon 2017
InSpec Workshop DevSecCon 2017InSpec Workshop DevSecCon 2017
InSpec Workshop DevSecCon 2017
 
AWS Survival Guide
AWS Survival GuideAWS Survival Guide
AWS Survival Guide
 
Security Tips to run Docker in Production
Security Tips to run Docker in ProductionSecurity Tips to run Docker in Production
Security Tips to run Docker in Production
 
Kubernetes security
Kubernetes securityKubernetes security
Kubernetes security
 
20+ Ways To Bypass Your Macos Privacy Mechanisms
20+ Ways To Bypass Your Macos Privacy Mechanisms20+ Ways To Bypass Your Macos Privacy Mechanisms
20+ Ways To Bypass Your Macos Privacy Mechanisms
 

Ähnlich wie How to debug IoT Agents

FIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE
 
Thick Application Penetration Testing: Crash Course
Thick Application Penetration Testing: Crash CourseThick Application Penetration Testing: Crash Course
Thick Application Penetration Testing: Crash CourseScott Sutherland
 
Creating Scalable JVM/Java Apps on Heroku
Creating Scalable JVM/Java Apps on HerokuCreating Scalable JVM/Java Apps on Heroku
Creating Scalable JVM/Java Apps on HerokuJoe Kutner
 
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016Patrick Chanezon
 
Thick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash CourseThick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash CourseNetSPI
 
Kotlin server side frameworks
Kotlin server side frameworksKotlin server side frameworks
Kotlin server side frameworksKen Yee
 
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...Felipe Prado
 
Continuous Localisation On A Massive Scale
Continuous Localisation On A Massive ScaleContinuous Localisation On A Massive Scale
Continuous Localisation On A Massive ScaleGary Lefman
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios
 
JCON_15FactorWorkshop.pptx
JCON_15FactorWorkshop.pptxJCON_15FactorWorkshop.pptx
JCON_15FactorWorkshop.pptxGrace Jansen
 
DevOPS training - Day 2/2
DevOPS training - Day 2/2DevOPS training - Day 2/2
DevOPS training - Day 2/2Vincent Mercier
 
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015Chris Gates
 
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...Edureka!
 
Introduction to FIWARE Cloud & Context Broker
Introduction to FIWARE Cloud & Context BrokerIntroduction to FIWARE Cloud & Context Broker
Introduction to FIWARE Cloud & Context BrokerFermin Galan
 
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...MongoDB
 
Galera on kubernetes_no_video
Galera on kubernetes_no_videoGalera on kubernetes_no_video
Galera on kubernetes_no_videoPatrick Galbraith
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"Volker Linz
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017Patrick Chanezon
 

Ähnlich wie How to debug IoT Agents (20)

FIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT Agents
 
Thick Application Penetration Testing: Crash Course
Thick Application Penetration Testing: Crash CourseThick Application Penetration Testing: Crash Course
Thick Application Penetration Testing: Crash Course
 
Creating Scalable JVM/Java Apps on Heroku
Creating Scalable JVM/Java Apps on HerokuCreating Scalable JVM/Java Apps on Heroku
Creating Scalable JVM/Java Apps on Heroku
 
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
 
Thick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash CourseThick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash Course
 
Kotlin server side frameworks
Kotlin server side frameworksKotlin server side frameworks
Kotlin server side frameworks
 
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
 
Continuous Localisation On A Massive Scale
Continuous Localisation On A Massive ScaleContinuous Localisation On A Massive Scale
Continuous Localisation On A Massive Scale
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
 
JCON_15FactorWorkshop.pptx
JCON_15FactorWorkshop.pptxJCON_15FactorWorkshop.pptx
JCON_15FactorWorkshop.pptx
 
DevOPS training - Day 2/2
DevOPS training - Day 2/2DevOPS training - Day 2/2
DevOPS training - Day 2/2
 
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
 
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
 
Introduction to FIWARE Cloud & Context Broker
Introduction to FIWARE Cloud & Context BrokerIntroduction to FIWARE Cloud & Context Broker
Introduction to FIWARE Cloud & Context Broker
 
Build Time Hacking
Build Time HackingBuild Time Hacking
Build Time Hacking
 
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
 
Galera on kubernetes_no_video
Galera on kubernetes_no_videoGalera on kubernetes_no_video
Galera on kubernetes_no_video
 
Core os dna_automacon
Core os dna_automaconCore os dna_automacon
Core os dna_automacon
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 

Mehr von Fernando Lopez Aguilar

Introduction to FIWARE technology
Introduction to FIWARE  technologyIntroduction to FIWARE  technology
Introduction to FIWARE technologyFernando Lopez Aguilar
 
DW2020 Data Models - FIWARE Platform
DW2020 Data Models - FIWARE PlatformDW2020 Data Models - FIWARE Platform
DW2020 Data Models - FIWARE PlatformFernando Lopez Aguilar
 
How to deploy a smart city platform?
How to deploy a smart city platform?How to deploy a smart city platform?
How to deploy a smart city platform?Fernando Lopez Aguilar
 
Building the Smart City Platform on FIWARE Lab
Building the Smart City Platform on FIWARE LabBuilding the Smart City Platform on FIWARE Lab
Building the Smart City Platform on FIWARE LabFernando Lopez Aguilar
 
Data Modeling with NGSI, NGSI-LD
Data Modeling with NGSI, NGSI-LDData Modeling with NGSI, NGSI-LD
Data Modeling with NGSI, NGSI-LDFernando Lopez Aguilar
 
Big Data and Machine Learning with FIWARE
Big Data and Machine Learning with FIWAREBig Data and Machine Learning with FIWARE
Big Data and Machine Learning with FIWAREFernando Lopez Aguilar
 
Operational Dashboards with FIWARE WireCloud
Operational Dashboards with FIWARE WireCloudOperational Dashboards with FIWARE WireCloud
Operational Dashboards with FIWARE WireCloudFernando Lopez Aguilar
 
Creating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Creating a Context-Aware solution, Complex Event Processing with FIWARE PerseoCreating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Creating a Context-Aware solution, Complex Event Processing with FIWARE PerseoFernando Lopez Aguilar
 
FIWARE Identity Management and Access Control
FIWARE Identity Management and Access ControlFIWARE Identity Management and Access Control
FIWARE Identity Management and Access ControlFernando Lopez Aguilar
 
Data persistency (draco, cygnus, sth comet, quantum leap)
Data persistency (draco, cygnus, sth comet, quantum leap)Data persistency (draco, cygnus, sth comet, quantum leap)
Data persistency (draco, cygnus, sth comet, quantum leap)Fernando Lopez Aguilar
 
Overview of the FIWARE Ecosystem
Overview of the FIWARE EcosystemOverview of the FIWARE Ecosystem
Overview of the FIWARE EcosystemFernando Lopez Aguilar
 
Cloud and Big Data in the agriculture sector
Cloud and Big Data in the agriculture sectorCloud and Big Data in the agriculture sector
Cloud and Big Data in the agriculture sectorFernando Lopez Aguilar
 
Context Information Management in IoT enabled smart systems - the basics
Context Information Management in IoT enabled smart systems - the basicsContext Information Management in IoT enabled smart systems - the basics
Context Information Management in IoT enabled smart systems - the basicsFernando Lopez Aguilar
 

Mehr von Fernando Lopez Aguilar (20)

Introduction to FIWARE technology
Introduction to FIWARE  technologyIntroduction to FIWARE  technology
Introduction to FIWARE technology
 
DW2020 Data Models - FIWARE Platform
DW2020 Data Models - FIWARE PlatformDW2020 Data Models - FIWARE Platform
DW2020 Data Models - FIWARE Platform
 
FIWARE and Smart Data Models
FIWARE and Smart Data ModelsFIWARE and Smart Data Models
FIWARE and Smart Data Models
 
How to deploy a smart city platform?
How to deploy a smart city platform?How to deploy a smart city platform?
How to deploy a smart city platform?
 
Building the Smart City Platform on FIWARE Lab
Building the Smart City Platform on FIWARE LabBuilding the Smart City Platform on FIWARE Lab
Building the Smart City Platform on FIWARE Lab
 
Data Modeling with NGSI, NGSI-LD
Data Modeling with NGSI, NGSI-LDData Modeling with NGSI, NGSI-LD
Data Modeling with NGSI, NGSI-LD
 
FIWARE and Robotics
FIWARE and RoboticsFIWARE and Robotics
FIWARE and Robotics
 
Big Data and Machine Learning with FIWARE
Big Data and Machine Learning with FIWAREBig Data and Machine Learning with FIWARE
Big Data and Machine Learning with FIWARE
 
Operational Dashboards with FIWARE WireCloud
Operational Dashboards with FIWARE WireCloudOperational Dashboards with FIWARE WireCloud
Operational Dashboards with FIWARE WireCloud
 
Creating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Creating a Context-Aware solution, Complex Event Processing with FIWARE PerseoCreating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Creating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
 
FIWARE Identity Management and Access Control
FIWARE Identity Management and Access ControlFIWARE Identity Management and Access Control
FIWARE Identity Management and Access Control
 
Data persistency (draco, cygnus, sth comet, quantum leap)
Data persistency (draco, cygnus, sth comet, quantum leap)Data persistency (draco, cygnus, sth comet, quantum leap)
Data persistency (draco, cygnus, sth comet, quantum leap)
 
Core Context Management
Core Context ManagementCore Context Management
Core Context Management
 
What is an IoT Agent
What is an IoT AgentWhat is an IoT Agent
What is an IoT Agent
 
FIWARE Overview
FIWARE OverviewFIWARE Overview
FIWARE Overview
 
Overview of the FIWARE Ecosystem
Overview of the FIWARE EcosystemOverview of the FIWARE Ecosystem
Overview of the FIWARE Ecosystem
 
Cloud and Big Data in the agriculture sector
Cloud and Big Data in the agriculture sectorCloud and Big Data in the agriculture sector
Cloud and Big Data in the agriculture sector
 
Berlin OpenStack Summit'18
Berlin OpenStack Summit'18Berlin OpenStack Summit'18
Berlin OpenStack Summit'18
 
Context Information Management in IoT enabled smart systems - the basics
Context Information Management in IoT enabled smart systems - the basicsContext Information Management in IoT enabled smart systems - the basics
Context Information Management in IoT enabled smart systems - the basics
 
FIWARE IoT Introduction 1
FIWARE IoT Introduction 1FIWARE IoT Introduction 1
FIWARE IoT Introduction 1
 

KĂŒrzlich hochgeladen

VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
Low Rate Call Girls Kolkata Avani đŸ€Œ 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani đŸ€Œ  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani đŸ€Œ  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani đŸ€Œ 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Call Girls Kolkata Ananya đŸ€Œ 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya đŸ€Œ  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya đŸ€Œ  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya đŸ€Œ 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Delhi Call girls
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsstephieert
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 

KĂŒrzlich hochgeladen (20)

VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
Low Rate Call Girls Kolkata Avani đŸ€Œ 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani đŸ€Œ  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani đŸ€Œ  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani đŸ€Œ 8250192130 🚀 Vip Call Girls Kolkata
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
VIP Call Girls Kolkata Ananya đŸ€Œ 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya đŸ€Œ  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya đŸ€Œ  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya đŸ€Œ 8250192130 🚀 Vip Call Girls Kolkata
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In South Ex đŸ“± 9999965857 đŸ€© Delhi đŸ«Š HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex đŸ“±  9999965857  đŸ€© Delhi đŸ«Š HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex đŸ“±  9999965857  đŸ€© Delhi đŸ«Š HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex đŸ“± 9999965857 đŸ€© Delhi đŸ«Š HOT AND SEXY VVIP 🍎 SERVICE
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girls
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 

How to debug IoT Agents

  • 1. Session 4 - How to debug IoT Agents Fernando LĂłpez, Cloud & Platform Senior Expert fernando.lopez@fiware.org @flopezaguilar FIWARE Foundation, e.V.
  • 2. Learning Goals § How to diagnose common problems § How to test services in isolation § How to set-up and interpret debug § Configuring IoT Agents: ‱ Where are settings described and defined? ‱ How can they be overridden? § Adding diagnostic debug § Where to look for help and advice? 1
  • 3. FIWARE Catalogue 22 Data/APIManagement PublicationMonetization Core Context Management (Context Broker) Context Processing, Analysis, Visualization Interface to IoT, Robotics and third party systems Deploymenttools 2 Development of Context-aware applications (Orion, STH-Comet, Cygnus, Quantum Leap, Draco) Connection to the Internet of Things (IDAS, OpenMTC) Real-time processing of context events (Perseo) Handling authorization and access control to APIs (Keyrock, Wilma, AuthZForce, APInf ) Publication and Monetization of Context Information (CKAN extensions, Data/API Biz Framework, IDRA) Creation of Application Dashboards (Wirecloud) Real-time Processing of media streams (Kurento) Business Intelligence (Knowage) Connection to robots (Fast RTPS,Micro XRCE-DDS) Big Data Context Analysis (Cosmos) Cloud Edge (FogFlow) Documents exchange (Domibus)
  • 4. Generic Scenario: IoT Sensors to FIWARE Context Data 3 § We are using an IoT Agent to receive data from a series of devices using a common protocol § The IoT Agent must interpret the data and create and modify NGSI data entities in the Context Broker § The system must react on changes of state. In this example, changes of state of data entities must somehow be persisted into a database using Cygnus, but we could equally be doing some processing or visualization. § In a working system is possible we would want amend the transport or add security.
  • 5. What can possibly go wrong? § Listening on the wrong port/resource-path/protocol § Check data is received on each part of the chain § Not paying attention to the FIWARE service headers § Misinterpreting received measures § Reading Numbers as Strings § Misusing localhost in a containerized environment 4
  • 6. What can possibly go wrong? § Setting up subscriptions too narrowly § Provisioning services and devices incorrectly § Using deprecated interfaces (NGSI v1) § Using obsolete or incompatible Generic Enablers 5
  • 7. Configuration and Provisioning § config.js § Base configuration file found in root of each enabler § Annotated § Most options switched off § Using Docker, you can: § Inject your own config.js volume § Override common ENVs § Override specific ENVs § Provisioning Groups and Devices § Further override options 6
  • 8. Setting Debug Debug options vary considerably between components: § Orion: -logLevel DEBUG -noCache -logForHumans § IoT Agents: IOTA_LOG_LEVEL=DEBUG § Cygnus: CYGNUS_LOG_LEVEL=DEBUG § Keyrock: DEBUG=idm:* § PEP Proxy: Amend the log_config.json file directly 7
  • 9. Debugging § Check Services are running docker ps Follow the logs docker logs -f fiware-iot-agent § PM2 Monitoring docker exec -it fiware-iot-agent pm2 monit § Listening to MQTT traffic docker run -it --rm --name mqtt-subscriber --network fiware_default efrecon/mqtt-client sub -h mosquitto -t "/#" § Sending dummy MQTT data docker run -it --rm --name mqtt-publisher --network fiware_default efrecon/mqtt-client pub -h mosquitto -m "c|1” –t "/TEF/motion001/attrs" 8
  • 10. Sanity Checks § Always stick to a specified version of each component § Check by using /version endpoints § Check component versions against releases § Read debug to see where data is/is not being retrieved § Initially use "idPattern": ".*" in subscriptions § Check the notification details such as timesSent § Ensure IOTA_CB_NGSI_VERSION and IOTA_AUTOCAST are set § Check your mapped attributes on provisioned devices 9
  • 11. Add diagnostic debug by amending the source § git clone - grep the source code for your error message § git clone - amend source code - add debug - create image direct from source - instructions in Dockerfile docker build -t iot-agent . § Fork source code and amend - create image from fork docker build -t iot-agent . --build-arg GITHUB_ACCOUNT=<your account> --build-arg GITHUB_REPOSITORY=<your repo> --build-arg SOURCE_BRANCH=<your branch> § All FIWARE projects are open-source - PRs accepted. 10
  • 12. Where to get help § Read the Documentation ‱ https://www.fiware.org/developers/catalogue § Find the Source Code on GitHub ‱ https://github.com/FIWARE/catalogue ‱ Raise issues with individual enablers § Ask development questions on Stack Overflow ‱ https://stackoverflow.com/questions/tagged/fiware ‱ Always tag question fiware plus relevant tags ‱ Stack Overflow is a third-party site. Follow their rules of engagement: ‱ Development questions only ‱ Provide logs/evidence of your efforts § Use the FIWARE Q+A ‱ https://ask.fiware.org/questions ‱ Usable for non-development questions 11
  • 13. Summary § Avoid simple problems by running basic sanity checks first § Test each link in the chain to diagnose your real issue § Setting up debug differs for each component - always check the documentation for details § IoT Agents can be set up and overridden many different ways: ‱ Base config.js, injected config.js, Docker ENV overrides ‱ Device specific provisioning § Read the documentation on ReadTheDocs § If you’re still having problems, add diagnostic debug by amending the source code and running a local image § Further help can be found on Ask, Stack Overflow or raising issues on GitHub 12