You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

FIWARE Perseo CEP邮件告警失效及规则存储异常排查求助

Troubleshooting Your FIWARE Orion-Perseo Alerting Workflow

Let's work through your three issues step by step to get your threshold-based email alerts working as expected.


1. No Alert Emails Received When Threshold Is Exceeded

This is likely a combination of missing event routing and misconfigured SMTP settings:

  • Fix SMTP Configuration in Perseo-FE
    Your current Docker Compose sets PERSEO_SMTP_SECURE=true with port 25—this is a conflict, as port 25 typically uses unencrypted connections. Adjust this based on your email provider's requirements:

    • If your provider uses unencrypted SMTP on port 25: Set PERSEO_SMTP_SECURE=false
    • If using TLS (port 587) or SSL (port 465): Keep PERSEO_SMTP_SECURE=true and update the PERSEO_SMTP_PORT to match your provider's secure port.
      Double-check that PERSEO_SMTP_AUTH_USER and PERSEO_SMTP_AUTH_PASS match your email account credentials exactly.
  • Add an Orion Subscription to Route Events to Perseo
    Perseo won't receive events unless Orion is configured to send notifications to it. Run this curl command to create a subscription (adjust entity/attribute filters if needed):

    curl -X POST http://localhost:1026/v2/subscriptions \
      -H "Content-Type: application/json" \
      -d '{
        "description": "Send AirQualityObserved temperature changes to Perseo",
        "subject": {
          "entities": [{"idPattern": ".*", "type": "AirQualityObserved"}],
          "condition": {"attrs": ["temperature"]}
        },
        "notification": {
          "http": {"url": "http://perseo-fe:9090/notices"},
          "attrs": ["temperature", "id", "type"]
        }
      }'
    
  • Simplify Your Rule's EPL Syntax
    Your current EPL has unnecessary nested casts and uses ? (left outer join operator) which might cause unexpected behavior. Update the rule to:

    {
      "name": "prueba1",
      "text": "select *, \"prueba1\" as ruleName, ev.temperature as temperature, ev.id as id from pattern [every ev=iotEvent(cast(temperature as float) > 45.5 and type=\"AirQualityObserved\")]",
      "action": {
        "type": "email",
        "template": "Entity ${id} temperature is ${temperature}",
        "parameters": {
          "to": "antonio.moreno@someplace.com",
          "from": "avisos@someplace.com",
          "subject": "High Temp"
        }
      }
    }
    

2. Rule Not Found in MongoDB but Retrievable via API

You're likely looking in the wrong database:

  • Check the Correct Perseo Database
    Perseo stores rules in the perseo database (by default), not Orion's orion database. Connect to your MongoDB container and run these commands:

    # Enter the MongoDB container
    docker exec -it fiware-mongo-db mongo
    
    # Switch to the Perseo database
    use perseo
    
    # Query for your rule
    db.rules.find({name: "prueba1"})
    
  • Verify MongoDB Authentication
    Your Perseo-FE config sets PERSEO_MONGO_USER="root" and PERSEO_MONGO_PASSWORD="example". Ensure the root user in MongoDB has read/write access to the perseo database. If not, create a dedicated Perseo user with appropriate permissions.


3. Docker Compose Correctness & Orion-Perseo Integration

Most of your Compose config is correct, but there are a few tweaks to confirm:

  • Confirm Network Connectivity
    All services are in the smartcity bridge network, so container-to-container communication (e.g., Orion → Perseo-FE, Perseo-FE → Perseo-Core) should work as expected.

  • Validate Perseo Configuration

    • PERSEO_ORION_URL=http://orion:1026/ (correct, points to Orion's internal address)
    • PERSEO_CORE_URL=http://perseo-core:8080 (correct, links front-end to core)
    • PERSEO_NOTICES_PATH='/notices' (matches the subscription URL we created earlier)
  • Restart Perseo Services
    After making SMTP or rule changes, restart the Perseo containers to apply updates:

    docker-compose restart perseo-fe perseo-core
    

Once you've applied these fixes, test your workflow by updating an AirQualityObserved entity's temperature above 45.5—you should receive the alert email, and your rule should be visible in the perseo MongoDB database.

内容的提问来源于stack exchange,提问作者Antonio Moreno Borras

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.13 07:45:42