feat: nbi interface md
This commit is contained in:
47
docs/nbi/protocol.md
Normal file
47
docs/nbi/protocol.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# OMC->北向通信协议 基于redis stream消息队列实现
|
||||
|
||||
## 告警关联关系数据上报变更
|
||||
|
||||
alarm_relation告警新增时
|
||||
|
||||
* streamkey和数据格式
|
||||
|
||||
```json
|
||||
alarm_relation
|
||||
{
|
||||
"payload": "{\"ids\":[\"871847\",\"557903\"]}"
|
||||
}
|
||||
```
|
||||
|
||||
1、871847,557903为alarm_relation表主键,至少一个数据
|
||||
|
||||
## 资源数据上报变更
|
||||
|
||||
nbi_cm表新增时
|
||||
|
||||
* streamkey和数据格式
|
||||
|
||||
```json
|
||||
nbi_cm
|
||||
{
|
||||
"payload": "{\"ids\":[\"642470\",\"105633\"]}"
|
||||
}
|
||||
```
|
||||
|
||||
1、642470,105633为nbi_cm表主键ID,ID支持多个
|
||||
|
||||
## 1分钟性能订阅上报数据
|
||||
|
||||
kpi_report_*表新增时
|
||||
|
||||
* 数据格式
|
||||
|
||||
```json
|
||||
nbi_pm
|
||||
{
|
||||
"payload": "{\"neType\":\"AMF\",\"id\":\"606538\"}"
|
||||
}
|
||||
```
|
||||
|
||||
1、AMF、PCF等为具体对应的网元
|
||||
2、606538为kpi_report_amf、kpi_report_pcf等表主键ID,ID支持一个
|
||||
@@ -29,6 +29,13 @@ chmod +rx ${RPM_BUILD_ROOT}/usr/local/bin/*
|
||||
chmod +x ${RPM_BUILD_ROOT}/usr/local/omc/htdocs/front
|
||||
chmod +rx ${RPM_BUILD_ROOT}/usr/lib64/*
|
||||
|
||||
# 安装前执行
|
||||
%pre
|
||||
echo -n "Stopping OMC service ... "
|
||||
systemctl stop restagent.service
|
||||
systemctl stop sshsvc.service
|
||||
echo "done"
|
||||
|
||||
# 安装完成后执行
|
||||
%post
|
||||
OMCRootDir=/usr/local/omc
|
||||
@@ -42,10 +49,10 @@ NginxEtcDir=/etc/nginx
|
||||
CFileList="restconf.yaml sshsvc.yaml omc.conf"
|
||||
LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png"
|
||||
|
||||
echo -n "Stopping OMC service ... "
|
||||
systemctl stop restagent.service
|
||||
systemctl stop sshsvc.service
|
||||
echo "done"
|
||||
# echo -n "Stopping OMC service ... "
|
||||
# systemctl stop restagent.service
|
||||
# systemctl stop sshsvc.service
|
||||
# echo "done"
|
||||
|
||||
for CFile in ${CFileList}; do
|
||||
if [ ! -e "${OMCEtcDir}/${CFile}" ]; then
|
||||
@@ -76,7 +83,7 @@ if [ ! -e ${UsrLocalBinDir}/${OMCDaemon} ]; then
|
||||
fi
|
||||
|
||||
# setting firewall
|
||||
port_list="80 443 44080 44443 33030 33443 3066 6379 22222"
|
||||
port_list="80 443 44080 44443 33030 33443 33066 6379 22222"
|
||||
for Port in ${port_list}; do
|
||||
echo -n "firewall-cmd add port ${Port} ... "
|
||||
firewall-cmd --zone=public --add-port=${Port}/tcp --permanent
|
||||
@@ -103,10 +110,10 @@ if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n "Starting OMC service ... "
|
||||
systemctl start sshsvc.service
|
||||
systemctl start restagent.service
|
||||
echo "done"
|
||||
# echo -n "Starting OMC service ... "
|
||||
# systemctl start sshsvc.service
|
||||
# systemctl start restagent.service
|
||||
# echo "done"
|
||||
|
||||
# 卸载时执行
|
||||
%postun
|
||||
@@ -130,11 +137,13 @@ if [ "$1" = "0" ] ; then
|
||||
firewall-cmd --reload
|
||||
rm -f ${UsrLocalBinDir}/${OMCDaemon}
|
||||
else
|
||||
echo -n "Starting OMC service ... "
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl stop restagent.service
|
||||
sudo systemctl stop sshsvc.service
|
||||
sudo systemctl start sshsvc.service
|
||||
sudo systemctl start restagent.service
|
||||
echo "done"
|
||||
fi
|
||||
|
||||
# 规定那些文件必须放入安装程序中,如果没有就报错
|
||||
|
||||
Reference in New Issue
Block a user