在多个 VOLTTRON Historian 框架之间切换或添加 [英] Switching between or adding multiple VOLTTRON Historian Framework
问题描述
我在我的 Volttron 平台上安装了以下代理:
I have below agent installed in my Volttron platform:
代理 - 身份 - 标记
AGENT - IDENTITY - TAG
sqlhistorianagent-3.6.1 - platform.historian - platform_historian
sqlhistorianagent-3.6.1 - platform.historian - platform_historian
遵循文档:http://volttron.readthedocs.io/en/4.1/core_services/historians/index.html
我尝试按照此文档安装另一个 Historian -(Mongo Historian):http://volttron.readthedocs.io/en/4.1/core_services/historians/Mongo-Historian.html#prerequisites
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
在 Ubuntu 上安装 mongodb 的步骤如下:
Below the steps followed to install mongodb on Ubuntu:
先决条件
1.Mongodb
cd volttron
. env/bin/activate
sudo scripts/historian-scripts/root_install_mongo_ubuntu.sh
2.Mongodb 连接器
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.
问题:
是否可以在同一个 Volttron 中使用两个代理?如果不是,请让我知道如何在历史代理之间切换(即用 Mongodbagent 替换 Sqlhistorianagent)或启用 Mongodbagent 代理?
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?
值得一提的是,我安装了Crate Historian".
推荐答案
pymongo 需要连接到 mongo 数据库.您仍然需要安装 MongodbHistorian.
pymongo is required for connecting to the mongo database. You still need to install the MongodbHistorian.
你可以看看https://github.com/VOLTTRON/volttron/blob/master/scripts/historian-scripts/start-historian-mysql.sh 以获取安装代理本身所需的示例.下面假设您从 volttron 目录的根目录运行它,并且您已修改 mongodbhistorian 目录中的配置文件以连接到您的 mongodb 实例.
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
还有一点需要注意的是,我们很快就会将 master 更新到releases/5.0rc,因此安装方法将发生变化.
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.
这篇关于在多个 VOLTTRON Historian 框架之间切换或添加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!