Switching between or adding multiple VOLTTRON Historian Framework

假如想象 提交于 2019-12-11 17:03:19

问题


I have below agent installed in my Volttron platform:

AGENT - IDENTITY - TAG

sqlhistorianagent-3.6.1 - platform.historian - platform_historian

Following the documentation: http://volttron.readthedocs.io/en/4.1/core_services/historians/index.html

I tried to install another Historian -(Mongo Historian) following this doc.:http://volttron.readthedocs.io/en/4.1/core_services/historians/Mongo-Historian.html#prerequisites

Below the steps followed to install mongodb on Ubuntu:

Prerequisites

1.Mongodb

cd volttron
. env/bin/activate
sudo scripts/historian-scripts/root_install_mongo_ubuntu.sh

2.Mongodb connector

pip install pymongo

The installation done successfully. However, I am using below commands to check the status of the installed agent.

volttron -l log1&
volttron-ctl status

For some reason, it is not showing up under my agents.

Question:

Is it possible to have both agents in the same Volttron? if it is not, please let me know how to switch between the historian agents (i.e replace Sqlhistorianagent with Mongodbagent) or enable Mongodbagent agent?

It is worth-mentioning that I have "Crate Historian" installed.


回答1:


pymongo is required for connecting to the mongo database. You still need to install the MongodbHistorian.

You can look at https://github.com/VOLTTRON/volttron/blob/master/scripts/historian-scripts/start-historian-mysql.sh for an example of what you will need to do to install the agent itself. The following assumes that you are running it from the root of the volttron directory and that you have modified the config file in the mongodbhistorian directory to connect to your mongodb instance.

#!/usr/bin/env bash

if [ ! -e "./volttron/platform" ]; then
    echo "Please execute from root of volttron repository."
    exit 0
fi

export HIST="services/core/MongodbHistorian"
export HIST_CONFIG="$HIST/config.mongodb"
SCRIPTS_CORE="./scripts/core"

$SCRIPTS_CORE/start_historian.sh $1

One thing also to note is that shortly we will be updating master to releases/5.0rc so the methodology for installations will have changed.



来源:https://stackoverflow.com/questions/48860971/switching-between-or-adding-multiple-volttron-historian-framework

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!