1
0

50 Commits

Author SHA1 Message Date
TsMask
2bebf6b729 chore: 更新版本号 2.2503.6 2025-05-09 19:41:50 +08:00
TsMask
17591b1705 chore: 更新版本号 2.2503.5 2025-04-12 10:11:01 +08:00
TsMask
5d9425c457 chore: 更新版本号 2.2503.4 2025-03-31 20:06:01 +08:00
TsMask
d8624c2fe9 chore: 更新版本号 2.2503.3 2025-03-21 15:36:13 +08:00
TsMask
cb8692cf44 chore: 更新版本号 2.2503.2 2025-03-14 11:04:59 +08:00
TsMask
cc45dd1be3 chore: 更新版本号 2.2503.1 2025-03-08 11:11:18 +08:00
TsMask
56d62831eb fix: badeb 中文字符串替换 2025-03-04 18:09:37 +08:00
TsMask
246fb027cd fix: badeb 中文字符串替换 2025-03-04 16:13:51 +08:00
TsMask
7818759109 chore: 更新版本号 2.2502.4 2025-02-28 19:56:37 +08:00
TsMask
48d5a0a783 feat: 添加kylin|anolis打包rpm 2025-02-24 16:36:32 +08:00
TsMask
e42d35c5e0 chore: 更新版本号 2.2502.3 2025-02-21 21:11:29 +08:00
zhangsz
667f6b1987 fix: ... 2025-02-21 19:39:40 +08:00
zhangsz
6adf76b589 fix: build arm /amd 2025-02-21 19:38:51 +08:00
zhangsz
49f0ba4a7a fix: ... 2025-02-20 21:20:04 +08:00
zhangsz
27826e4523 fix: ... 2025-02-20 21:16:25 +08:00
zhangsz
1316629dc8 fix:... 2025-02-20 21:06:47 +08:00
zhangsz
82a0d32f15 fix: git ignore 2025-02-20 20:42:35 +08:00
zhangsz
83ce21d2c3 fix: ... 2025-02-20 20:39:35 +08:00
zhangsz
1efc851b39 fix: support openEuler build 2025-02-20 19:50:18 +08:00
TsMask
d9c16a616c chore: 更新版本号 2.2502.2 2025-02-14 19:41:46 +08:00
TsMask
a2800bed0d chore: 更新版本号 2.2502.1 2025-02-08 19:47:04 +08:00
TsMask
cf97351fc9 chore: 更新版本号 2.2501.4 2025-01-24 20:42:17 +08:00
TsMask
251284aa38 chore: 更新版本号 2.2501.3 2025-01-17 18:43:50 +08:00
TsMask
1fe4eddd33 del: 移除程序打包service错误 2025-01-11 11:37:40 +08:00
TsMask
6211a88f2e del: 移除captrace/data2html/crontask程序 2025-01-11 10:17:20 +08:00
TsMask
b73cd05af8 chore: 更新版本号 2.2501.2 2025-01-10 19:41:54 +08:00
TsMask
16d20fcad4 chore: 更新版本号 2.2501.1 2025-01-03 21:51:22 +08:00
TsMask
9f1a097e2a chore: 更新版本号 2.2412.4 2024-12-28 10:56:29 +08:00
TsMask
cfa0825e22 chore: 更新版本号 2.2412.3 2024-12-20 18:55:56 +08:00
TsMask
5bc958e911 chore: 更新版本号 2.2412.2 2024-12-13 21:23:58 +08:00
TsMask
e636f76506 chore: 更新版本号 2.2412.1 2024-12-09 09:58:32 +08:00
TsMask
1ca15477ca chore: 更新版本号 2.2411.4 2024-11-30 17:14:23 +08:00
TsMask
7ce96a7178 chore: 更新版本号 2.2411.3 2024-11-23 16:38:37 +08:00
TsMask
639107ba3d chore: 更新版本号 2.2411.2 2024-11-15 18:17:41 +08:00
dd0d67c0ea update spec for ky10 arm build 2024-11-12 09:24:50 +08:00
343e32735d update spec for build 2024-11-08 19:39:40 +08:00
37477ad9f1 update spec for build 2024-11-08 19:25:56 +08:00
1fb64561c4 update spec for build 2024-11-08 19:15:39 +08:00
abb2a8a33d update spec for build 2024-11-08 19:11:31 +08:00
TsMask
1dc143c062 chore: 更新版本号 2.2411.1 2024-11-08 17:56:57 +08:00
ff7973194f update makepkg.sh 2024-11-07 16:40:44 +08:00
c9277f1123 shell to sed fe src/hooks 2024-11-07 15:16:15 +08:00
b8c1740875 update make package shell 2024-11-07 14:57:42 +08:00
121cbea72e update make package sh 2024-11-07 14:46:21 +08:00
3e08ef0cc4 update build package shell script 2024-11-07 14:37:00 +08:00
38dabd180d support customized images and locales for FE 2024-11-07 11:47:18 +08:00
cd6578f57c update npm install --force 2024-11-05 18:02:49 +08:00
TsMask
f403456185 chore: 更新版本号 2.2410.4 2024-11-02 15:35:36 +08:00
dbded5635f update git ignore list 2024-11-01 17:29:25 +08:00
44fad7ae82 Optimize the packaging process 2024-11-01 17:24:37 +08:00
136 changed files with 177 additions and 26791 deletions

28
.gitignore vendored
View File

@@ -12,24 +12,20 @@
# Run temp file and dir
docs/temp/
# Built Visual Studio Code Extensions
*.vsix
*.bak
# build files
build
debbuild/etc
debbuild/usr
debbuild/lib
debbuild/22.04/etc
debbuild/22.04/usr
debbuild/22.04/lib
release
rpmbuild/RPMS
rpmbuild/SOURCES
rpmbuild/BUILD
build/usr/local/omc/bin/captrace
build/usr/local/omc/bin/crontask
build/usr/local/omc/bin/data2html
build/usr/local/omc/bin/restagent
build/usr/local/omc/bin/sshsvc
debbuild/22.04/usr/local/omc/bin/captrace
debbuild/22.04/usr/local/omc/bin/crontask
debbuild/22.04/usr/local/omc/bin/data2html
debbuild/22.04/usr/local/omc/bin/restagent
debbuild/22.04/usr/local/omc/bin/sshsvc
# release package
# build/usr/local/omc/htdocs/
# debbuild/22.04/usr/local/omc/htdocs/
# debbuild/usr/local/omc/htdocs/
release/

180
build.sh
View File

@@ -56,7 +56,7 @@ fi
ProjectL=omc
ProjectU=OMC
PROJECT=${ProjectL}
VERSION=2.2410.2
VERSION=2.2503.6
RelDate=`date +%Y%m%d`
RelVer=${VERSION}-${RelDate}
Ky10Arch=ky10.aarch64
@@ -66,10 +66,10 @@ DebPkgName=${ProjectL}-r${RelVer}-ub*.deb
EmsBEDir=${GitLocalRoot}/be.ems
EmsBuildRoot=${GitLocalRoot}/build.ems
RpmArch=`arch`
RpmsDir=${EmsBuildRoot}/rpmbuild/RPMS/
RpmsDir=${EmsBuildRoot}/rpmbuild/RPMS
ReleaseDir=${EmsBuildRoot}/release
DumpToolDir=${EmsBEDir}/tools/misc
ProjectTag=multi-tenancy
ProjectTag=""
BuildDir=${EmsBuildRoot}/build
CustomizedDir=${EmsBuildRoot}/customized
@@ -80,12 +80,13 @@ BuildLibDir=${BuildDir}/lib
BuildLibSystemDir=${BuildLibDir}/systemd/system
DebBuildDir=${EmsBuildRoot}/debbuild
DebBuildOMCDir=${EmsBuildRoot}/debbuild/usr/local/omc
DebFEBuildDir=${EmsBuildRoot}/debbuild/usr/local/omc/htdocs
DebFEBuildDir=${DebBuildOMCDir}/htdocs
DebBuild2204Dir=${EmsBuildRoot}/debbuild/22.04
DebBuild2204OMCDir=${EmsBuildRoot}/debbuild/22.04/usr/local/omc
DebFEBuild2204Dir=${EmsBuildRoot}/debbuild/22.04/usr/local/omc/htdocs
DebFEBuild2204Dir=${DebBuild2204OMCDir}/htdocs
RpmBuildDir=${EmsBuildRoot}/rpmbuild
RpmFEBuildDir=${RpmBuildDir}/BUILD/usr/local/omc/htdocs
RpmBuildOMCDir=${RpmBuildDir}/BUILD/usr/local/omc
RpmFEBuildDir=${RpmBuildOMCDir}/htdocs
OmcInstallDir=/usr/local/omc
ConfigEtcDir=${EmsBEDir}/config/etc
ConfigSystemdDir=${EmsBEDir}/config/systemd
@@ -93,36 +94,92 @@ EmsFEDir=${GitLocalRoot}/fe.ems
EmsFEVue3Dir=${GitLocalRoot}/fe.ems.vue3/dist
LibDir=${EmsBEDir}/lib
RESTAGENT=restagent
CRONTASK=crontask
SshSvcBin=sshsvc
CapTraceBin=captrace
Data2htmlBin=data2html
NBI_ALARM=nbi_alarm
NBI_AGENT=nbi_agent
AAAA_AGENT=4a_agent
RestagentDir=${EmsBEDir}/${RESTAGENT}
CrontaskDir=${EmsBEDir}/${CRONTASK}
SshSvcDir=${EmsBEDir}/${SshSvcBin}
CapTraceDir=${EmsBEDir}/${CapTraceBin}
Data2htmlDir=${EmsBEDir}/${Data2htmlBin}
DBSQLSrcDir=${EmsBEDir}/database
MiscDir=${EmsBEDir}/misc
FrontBuildDir=${BuildOMCDir}/htdocs
FrontSrcDir=${EmsBEDir}/front
CrontaskSize=27788951
RestagentSize=29525312
BinWriterDir=${HOME}/bin
if [[ ${RpmArch} =~ "x86_64" ]];then
# Get the output of uname -a
UnameOutput=$(uname -a)
# Extract hardware architecture
if [[ $UnameOutput =~ "x86_64" ]]; then
RelArch=amd64
elif [[ ${RpmArch} =~ "aarch64" ]];then
RpmArch=x86_64
elif [[ $UnameOutput =~ "aarch64" ]]; then
RelArch=arm64
RpmArch=aarch64
else
echo "Unsupported hardware architecture"
exit 1
fi
get_os_info() {
if [ -f /etc/os-release ]; then
. /etc/os-release
echo $ID
else
echo "unknown"
fi
}
get_os_version() {
if [ -f /etc/os-release ]; then
. /etc/os-release
echo $VERSION_ID
else
echo "unknown"
fi
}
OSVersion=$(get_os_version)
case $(get_os_info) in
ubuntu|debian)
ptype=deb
if [[ "$OSVersion" == "22.04" ]]; then
RelOS=ub22
DebBuildDir=${DebBuild2204Dir}
DebBuildOMCDir=${DebBuild2204OMCDir}
DebFEBuildDir=${DebFEBuild2204Dir}
elif [[ "$OSVersion" == "18.04" ]]; then
RelOS=ub18
else
echo "Unsupported Ubuntu version: $OSVersion"
exit 1
fi
;;
centos|rhel)
ptype=rpm
RelOS=ct8
RpmPkgRename=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}.${ptype}
;;
openEuler)
ptype=rpm
RelOS=oe20
RpmPkgName=${ProjectL}-${RelVer}.${RpmArch}.${ptype}
RpmPkgRename=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}.${ptype}
;;
kylin|anolis)
ptype=rpm
RelOS=ky
RpmPkgName=${ProjectL}-${RelVer}.${RpmArch}.${ptype}
RpmPkgRename=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}.${ptype}
;;
*)
echo "Unsupported OS"
exit 1
;;
esac
case "${pkgtype}" in
rpm)
echo "Begin to make ${pkgtype} package ======>"
ReleasePkgDir=${ReleaseDir}/rpms/${RelArch}
ProcList="restagent crontask sshsvc captrace data2html"
ProcList="restagent sshsvc"
cd $EmsBEDir
for procName in $ProcList;do
cd $EmsBEDir/$procName
@@ -138,24 +195,15 @@ case "${pkgtype}" in
rm -rf ${RpmBuildDir}/BUILD/usr/local/omc/etc/db/*
cp -rf ${RestagentDir}/${RESTAGENT} ${BuildOMCBinDir}
cp -rf ${CrontaskDir}/${CRONTASK} ${BuildOMCBinDir}
cp -rf ${SshSvcDir}/${SshSvcBin} ${BuildOMCBinDir}
cp -rf ${CapTraceDir}/${CapTraceBin} ${BuildOMCBinDir}
cp -rf ${Data2htmlDir}/${Data2htmlBin} ${BuildOMCBinDir}
# ${BinWriterDir}/binWriter ${BuildOMCBinDir}/${RESTAGENT} ${RestagentSize}
# ${BinWriterDir}/binWriter ${BuildOMCBinDir}/${CRONTASK} ${CrontaskSize}
# cp -rf ${MiscDir}/ne-hosts ${BuildOMCBinDir}
# cp -rf ./nbi/${NBI_ALARM}/bin/${NBI_ALARM} ${BinDir2}
# cp -rf ./nbi/${NBI_AGENT}/bin/${NBI_AGENT} ${BinDir2}
# cp -rf ./${4A_AGENT}/bin/${4A_AGENT} ${BinDir2}
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
# rm -rf ${BinDir2}/ne-hosts
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
rm -rf ${BuildOMCEtcDir}/db/*
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgvue3
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
#Get SQL from database, overwrite from git
if [ "$dumpdb" = "yes" ]; then
cd ${DumpToolDir}
@@ -167,10 +215,9 @@ case "${pkgtype}" in
mkdir -p ${FrontBuildDir}/front
cp -rf ${EmsFEVue3Dir}/* ${FrontBuildDir}/front >/dev/null
chmod 755 ${BuildOMCBinDir}/*
# chmod 755 ${BinDir2}/*
cp -rf ${BuildDir}/* ${RpmBuildDir}/BUILD/
#cp -rf ${BuildDir}/nginx ${RpmBuildDir}/BUILD/etc/
#cp -rf ${BuildDir}/systemd ${RpmBuildDir}/BUILD/lib/
cp -rf ${CustomizedDir}/agt.d ${RpmBuildOMCDir}/static
cp -rf ${CustomizedDir}/omc.d ${RpmBuildOMCDir}/static
cd ${RpmBuildDir}
rpmbuild -bb -D "_topdir ${RpmBuildDir}" ${RpmBuildDir}/SPECS/omc.spec
@@ -179,10 +226,12 @@ case "${pkgtype}" in
rm -f omc-md5sum.txt
# rpm --addsign *.rpm
md5sum $RpmPkgRename >omc-md5sum.txt
echo "Finish to make ${pkgtype} package <======"
;;
deb)
echo "Begin to make ${pkgtype} package ======>"
ReleasePkgDir=${ReleaseDir}/debs/${RelArch}
ProcList="restagent crontask sshsvc captrace data2html"
ProcList="restagent sshsvc"
cd $EmsBEDir
for procName in $ProcList;do
cd $EmsBEDir/$procName
@@ -190,25 +239,10 @@ case "${pkgtype}" in
make
done
VersionID=`grep VERSION_ID /etc/os-release`
if [[ ${VersionID} =~ 'VERSION_ID="22.04"' ]]; then
DebBuildDir=${DebBuild2204Dir}
DebBuildOMCDir=${DebBuild2204OMCDir}
DebFEBuildDir=${DebFEBuild2204Dir}
#DebPkgFile=${PROJECT}-${VERSION}-22.04-${Release).${PLATFORM).deb
DebPkgFile=${PROJECT}-r${VERSION}-${RelDate}-ub22.deb
if [ ! $ProjectTag = "" ]; then
DebPkgFile=${PROJECT}-r${VERSION}-${RelDate}-ub22-${ProjectTag}.deb
fi
elif [[ ${VersionID} =~ 'VERSION_ID="18.04"' ]]; then
DebPkgFile=${PROJECT}-r${VERSION}-${RelDate}-ub18.deb
if [ ! $ProjectTag = "" ]; then
DebPkgFile=${PROJECT}-r${VERSION}-${RelDate}-ub18-${ProjectTag}.deb
fi
else
echo "Invalid OS release: ${VersionID}"
exit 1
fi
DebPkgFile=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}.${ptype}
if [ ! $ProjectTag = "" ]; then
DebPkgFile=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}-${ProjectTag}.${ptype}
fi
cd ${EmsBEDir}
@@ -220,17 +254,14 @@ case "${pkgtype}" in
rm -rf ${DebBuildOMCDir}/static/*
cp -rf ${RestagentDir}/${RESTAGENT} ${BuildOMCBinDir}
cp -rf ${CrontaskDir}/${CRONTASK} ${BuildOMCBinDir}
cp -rf ${SshSvcDir}/${SshSvcBin} ${BuildOMCBinDir}
cp -rf ${CapTraceDir}/${CapTraceBin} ${BuildOMCBinDir}
cp -rf ${Data2htmlDir}/${Data2htmlBin} ${BuildOMCBinDir}
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
rm -rf ${BuildOMCEtcDir}/db/*
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgvue3
#Get SQL from database, overwrite from git
if [ "${dumpdb}" = "yes" ]; then
cd ${DumpToolDir}
@@ -250,17 +281,20 @@ case "${pkgtype}" in
#cp -rf ${BuildDir}/systemd/*.service ${DebBuildDir}/lib/systemd/system/
chmod +x ${DebBuildDir}/usr/local/omc/bin/*
sed -i "s/YYYYMMDD/${RelDate}/g" ${DebBuildDir}/DEBIAN/control
sed -i "s/Architecture: amd64/Architecture: ${RelArch}/g" ${DebBuildDir}/DEBIAN/control
perl -0777 -i -pe 's/ne:\n user: root/ne:\n user: omcuser/g' ${DebBuildDir}/usr/local/omc/etc/default/restconf.yaml
dpkg -b ${DebBuildDir} ${ReleasePkgDir}/${DebPkgFile}
cd ${ReleasePkgDir}
rm -f omc-md5sum.txt
# rpm --addsign *.rpm
md5sum ${DebPkgName} >omc-md5sum.txt
md5sum ${DebPkgName} >omc-md5sum.txt
echo "Finish to make ${pkgtype} package <======="
;;
badeb)
echo "Begin to make ${pkgtype} package ======>"
ReleasePkgDir=${ReleaseDir}/debs/${RelArch}
ProcList="restagent crontask sshsvc captrace data2html"
ProcList="restagent sshsvc"
cd $EmsBEDir
for procName in $ProcList;do
cd $EmsBEDir/$procName
@@ -268,19 +302,7 @@ case "${pkgtype}" in
make
done
VersionID=`grep VERSION_ID /etc/os-release`
if [[ ${VersionID} =~ 'VERSION_ID="22.04"' ]]; then
DebBuildDir=${DebBuild2204Dir}
DebBuildOMCDir=${DebBuild2204OMCDir}
DebFEBuildDir=${DebFEBuild2204Dir}
#DebPkgFile=${PROJECT}-${VERSION}-22.04-${Release).${PLATFORM).deb
DebPkgFile=${PROJECT}-r${VERSION}-${RelDate}-ub22-ba.deb
elif [[ ${VersionID} =~ 'VERSION_ID="18.04"' ]]; then
DebPkgFile=${PROJECT}-r${VERSION}-${RelDate}-ub18-ba.deb
else
echo "Invalid OS release: ${VersionID}"
exit 1
fi
DebPkgFile=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}-ba.deb
cd ${EmsBEDir}
@@ -292,17 +314,15 @@ case "${pkgtype}" in
rm -rf ${DebBuildOMCDir}/static/*
cp -rf ${RestagentDir}/${RESTAGENT} ${BuildOMCBinDir}
cp -rf ${CrontaskDir}/${CRONTASK} ${BuildOMCBinDir}
cp -rf ${SshSvcDir}/${SshSvcBin} ${BuildOMCBinDir}
cp -rf ${CapTraceDir}/${CapTraceBin} ${BuildOMCBinDir}
cp -rf ${Data2htmlDir}/${Data2htmlBin} ${BuildOMCBinDir}
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
rm -rf ${BuildOMCEtcDir}/db/*
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgvue3
#Get SQL from database, overwrite from git
if [ "${dumpdb}" = "yes" ]; then
cd ${DumpToolDir}
@@ -318,16 +338,18 @@ case "${pkgtype}" in
cp -rf ${BuildDir}/* ${DebBuildDir}/
cp -rf ${CustomizedDir}/ba.d ${DebBuildOMCDir}/static
# replace Chinese character
find "${DebBuildOMCDir}/etc/db" -type f -name '*.sql' -exec sed -i 's/[一-龥]//g' {} +
find "${DebBuildOMCDir}/etc/db" -type f -name '*.sql' -exec sed -i 's/[一-龥()“”,。?!]~·]//g' {} +
echo "Replace all chinese character."
chmod +x ${DebBuildDir}/usr/local/omc/bin
sed -i "s/YYYYMMDD/${RelDate}/g" ${DebBuildDir}/DEBIAN/control
sed -i "s/Architecture: amd64/Architecture: ${RelArch}/g" ${DebBuildDir}/DEBIAN/control
perl -0777 -i -pe 's/ne:\n user: root/ne:\n user: omcuser/g' ${DebBuildDir}/usr/local/omc/etc/default/restconf.yaml
dpkg -b ${DebBuildDir} ${ReleasePkgDir}/${DebPkgFile}
cd ${ReleasePkgDir}
rm -f omc-md5sum.txt
md5sum ${DebPkgName} >omc-md5sum.txt
md5sum ${DebPkgName} >omc-md5sum.txt
echo "Finish to make ${pkgtype} package <======"
;;
*)
usage

View File

@@ -1,182 +0,0 @@
select count(*) from kpi_report_upf
CREATE VIEW kpi_report_all AS
SELECT * FROM kpi_report_udm
UNION ALL
SELECT * FROM kpi_report_amf
UNION ALL
SELECT * FROM kpi_report_upf;
select DISTINCT(ne_type) from kpi_title
SELECT DISTINCT LOWER(ne_type) FROM kpi_title
SELECT JSON_EXTRACT(kpi_values, CONCAT('$[', @path, '].', @key_to_search)) AS value FROM kpi_report_upf where `date`="2024-04-26";
SELECT JSON_EXTRACT(JSON_CONTAINS(kpi_values, '{"kpi_id": "UPF.01"}') FROM kpi_report_upf where `date`="2024-04-26";
SELECT
JSON_EXTRACT(kpi_values, CONCAT('$[', JSON_UNQUOTE(JSON_SEARCH(kpi_values, 'kpi_id', 'UPF.01')), '].value')) AS value_UPF01,
JSON_EXTRACT(kpi_values, CONCAT('$[', JSON_UNQUOTE(JSON_SEARCH(kpi_values, 'kpi_id', 'UPF.03')), '].value')) AS value_UPF03
FROM
kpi_report_upf
WHERE
JSON_SEARCH(kpi_values, 'kpi_id', 'UPF.01') IS NOT NULL
AND JSON_SEARCH(kpi_values, 'kpi_id', 'UPF.03') IS NOT NULL;
SELECT
JSON_EXTRACT(kpi_values, CONCAT('$[', JSON_UNQUOTE(JSON_SEARCH(kpi_values, 'all', 'UPF.01')), '].value')) AS value_UPF01
FROM
kpi_report_upf
WHERE
JSON_CONTAINS(kpi_values, '{"kpi_id": "UPF.01"}');
SELECT
COALESCE(JSON_EXTRACT(kpi_values, CONCAT('$[', JSON_UNQUOTE(JSON_SEARCH(kpi_values, 'all', 'UPF.01')), '].value')), 0) AS value_UPF01
FROM
kpi_report_upf
WHERE
JSON_CONTAINS(kpi_values, '{"kpi_id": "UPF.01"}');
SELECT
CONCAT(
DATE_FORMAT( gk.start_time, '%H:' ),
LPAD( FLOOR( MINUTE ( gk.start_time ) / 15 ) * 15, 2, '0' )
) AS timeGroup,
min( CASE WHEN gk.INDEX != '' THEN gk.INDEX ELSE 0 END ) AS startIndex,
min( CASE WHEN gk.ne_name != '' THEN gk.ne_name ELSE 0 END ) AS neName,
sum( CASE WHEN JSON_CONTAINS(kpi_values,JSON_OBJECT('kpi_id', "UPF.01")) THEN gk.kpi_values->'$[*].value ELSE 0 END ) AS 'UPF.01',
sum( CASE WHEN JSON_CONTAINS(kpi_values,JSON_OBJECT('kpi_id', "UPF.02")) THEN gk.kpi_values->'$[*].value ELSE 0 END ) AS 'UPF.02',
sum( CASE WHEN gk.kpi_id = 'UPF.03' THEN gk.VALUE ELSE 0 END ) AS 'UPF.03',
sum( CASE WHEN gk.kpi_id = 'UPF.04' THEN gk.VALUE ELSE 0 END ) AS 'UPF.04',
sum( CASE WHEN gk.kpi_id = 'UPF.05' THEN gk.VALUE ELSE 0 END ) AS 'UPF.05',
sum( CASE WHEN gk.kpi_id = 'UPF.06' THEN gk.VALUE ELSE 0 END ) AS 'UPF.06',
sum( CASE WHEN gk.kpi_id = 'UPF.07' THEN gk.VALUE ELSE 0 END ) AS 'UPF.07',
sum( CASE WHEN gk.kpi_id = 'UPF.08' THEN gk.VALUE ELSE 0 END ) AS 'UPF.08',
sum( CASE WHEN gk.kpi_id = 'UPF.09' THEN gk.VALUE ELSE 0 END ) AS 'UPF.09',
sum( CASE WHEN gk.kpi_id = 'UPF.10' THEN gk.VALUE ELSE 0 END ) AS 'UPF.10',
sum( CASE WHEN gk.kpi_id = 'UPF.14' THEN gk.VALUE ELSE 0 END ) AS 'UPF.14',
sum( CASE WHEN gk.kpi_id = 'UPF.11' THEN gk.VALUE ELSE 0 END ) AS 'UPF.11',
sum( CASE WHEN gk.kpi_id = 'UPF.12' THEN gk.VALUE ELSE 0 END ) AS 'UPF.12',
sum( CASE WHEN gk.kpi_id = 'UPF.13' THEN gk.VALUE ELSE 0 END ) AS 'UPF.13',
sum( CASE WHEN gk.kpi_id = 'UPF.15' THEN gk.VALUE ELSE 0 END ) AS 'UPF.15'
FROM
kpi_report_upf gk
WHERE
gk.rm_uid = '4400HX1UPF001'
AND gk.date = "2024-04-26"
AND gk.start_time >= '00:00:00'
AND gk.start_time <= '23:59:59'
GROUP BY
timeGroup
ORDER BY
timeGroup DESC
SELECT
CONCAT(
DATE_FORMAT( gk.start_time, '%H:' ),
LPAD( FLOOR( MINUTE ( gk.start_time ) / 15 ) * 15, 2, '0' )
) AS timeGroup,
min( CASE WHEN gk.INDEX != '' THEN gk.INDEX ELSE 0 END ) AS startIndex,
min( CASE WHEN gk.ne_name != '' THEN gk.ne_name ELSE 0 END ) AS neName,
SUM(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[0].kpi_id') = "UPF.01" THEN JSON_EXTRACT(gk.kpi_values, '$[0].value') ELSE 0 END) AS 'UPF.01',
SUM(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[1].kpi_id') = "UPF.02" THEN JSON_EXTRACT(gk.kpi_values, '$[1].value') ELSE 0 END) AS 'UPF.02',
SUM(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[2].kpi_id') = "UPF.03" THEN JSON_EXTRACT(gk.kpi_values, '$[2].value') ELSE 0 END) AS 'UPF.03'
FROM
kpi_report_upf gk
WHERE
gk.rm_uid = '4400HX1UPF001'
AND gk.date = "2024-05-08"
AND gk.start_time >= '10:55:00'
AND gk.start_time <= '23:59:59'
GROUP BY
timeGroup
ORDER BY
timeGroup DESC
SELECT
CONCAT(
DATE_FORMAT( gk.start_time, '%H:' ),
LPAD( FLOOR( MINUTE ( gk.start_time ) / 15 ) * 15, 2, '0' )
) AS timeGroup,
min( CASE WHEN gk.INDEX != '' THEN gk.INDEX ELSE 0 END ) AS startIndex,
min( CASE WHEN gk.ne_name != '' THEN gk.ne_name ELSE 0 END ) AS neName,
SUM(JSON_EXTRACT(gk.kpi_values, '$[0].`UPF.01`')) AS 'UPF.01',
SUM(JSON_EXTRACT(gk.kpi_values, '$[1].`UPF.02`')) AS 'UPF.02',
SUM(JSON_EXTRACT(gk.kpi_values, '$[2].`UPF.03`')) AS 'UPF.03'
FROM
kpi_report_upf gk
WHERE
gk.rm_uid = '4400HX1UPF001'
AND gk.date = "2024-05-08"
AND gk.start_time >= '10:53:00'
AND gk.start_time <= '10:59:59'
GROUP BY
timeGroup
ORDER BY
timeGroup DESC
SELECT
min( CASE WHEN gk.INDEX != '' THEN gk.INDEX ELSE 0 END ) AS startIndex,
min( CASE WHEN gk.ne_name != '' THEN gk.ne_name ELSE 0 END ) AS neName,
SUM(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[*].kpi_id') = 'UPF.01' THEN JSON_EXTRACT(gk.kpi_values, '$[*].value') ELSE 0 END) AS 'UPF.01',
SUM(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[*].kpi_id') = 'UPF.02' THEN JSON_EXTRACT(gk.kpi_values, '$[*].value') ELSE 0 END) AS 'UPF.02',
SUM(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[*].kpi_id') = 'UPF.03' THEN JSON_EXTRACT(gk.kpi_values, '$[*].value') ELSE 0 END) AS 'UPF.03'
FROM
kpi_report_upf gk
WHERE
gk.rm_uid = '4400HX1UPF001'
AND gk.date = "2024-05-03"
AND gk.start_time >= '00:00:00'
AND gk.start_time <= '23:59:59'
SELECT
CONCAT( DATE_FORMAT(CONCAT(gk.`date`, " ", gk.start_time), '%Y-%m-%d %H:'), LPAD(FLOOR(MINUTE(gk.start_time) / 15) * 15, 2, '0') ) AS timeGroup,
min(CASE WHEN gk.index != '' THEN gk.index ELSE 0 END) AS startIndex,
min(CASE WHEN gk.ne_type != '' THEN gk.ne_type ELSE 0 END) AS neType,
min(CASE WHEN gk.ne_name != '' THEN gk.ne_name ELSE 0 END) AS neName,
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[0].kpi_id') = 'UPF.01' THEN JSON_EXTRACT(gk.kpi_values, '$[0].value') ELSE 0 END) AS 'UPF.01',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[1].kpi_id') = 'UPF.02' THEN JSON_EXTRACT(gk.kpi_values, '$[1].value') ELSE 0 END) AS 'UPF.02',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[2].kpi_id') = 'UPF.03' THEN JSON_EXTRACT(gk.kpi_values, '$[2].value') ELSE 0 END) AS 'UPF.03',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[3].kpi_id') = 'UPF.04' THEN JSON_EXTRACT(gk.kpi_values, '$[3].value') ELSE 0 END) AS 'UPF.04',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[4].kpi_id') = 'UPF.05' THEN JSON_EXTRACT(gk.kpi_values, '$[4].value') ELSE 0 END) AS 'UPF.05',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[5].kpi_id') = 'UPF.06' THEN JSON_EXTRACT(gk.kpi_values, '$[5].value') ELSE 0 END) AS 'UPF.06',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[6].kpi_id') = 'UPF.07' THEN JSON_EXTRACT(gk.kpi_values, '$[6].value') ELSE 0 END) AS 'UPF.07',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[7].kpi_id') = 'UPF.08' THEN JSON_EXTRACT(gk.kpi_values, '$[7].value') ELSE 0 END) AS 'UPF.08',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[8].kpi_id') = 'UPF.09' THEN JSON_EXTRACT(gk.kpi_values, '$[8].value') ELSE 0 END) AS 'UPF.09',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[9].kpi_id') = 'UPF.10' THEN JSON_EXTRACT(gk.kpi_values, '$[9].value') ELSE 0 END) AS 'UPF.10'
FROM kpi_report_upf gk
where gk.rm_uid = '4400HX1UPF001' and gk.ne_type = 'UPF' and CONCAT(gk.`date`, " ", gk.start_time) >= '2024-05-08 10:00:00' and CONCAT(gk.`date`, " ", gk.start_time) <= '2024-05-08 23:59:59'
GROUP BY timeGroup order by timeGroup desc
DELETE t1
FROM ne_state t1
JOIN (
SELECT `timestamp`
FROM ne_state where ne_type='upf'
ORDER BY id DESC
LIMIT 999999 OFFSET 3
) t2 ON t1.`timestamp` = t2.`timestamp` and ne_type='upf';
select count(1) from ne_state where ne_type='upf'
CREATE TABLE IF NOT EXISTS kpi_report_test AS SELECT * FROM kpi_report WHERE 1=0;ALTER TABLE kpi_report_test MODIFY COLUMN `id` int(11) NOT NULL AUTO_INCREMENT FIRST,ADD PRIMARY KEY IF NOT EXISTS (`id`);
ALTER TABLE kpi_report_ims MODIFY COLUMN `id` int(11) NOT NULL AUTO_INCREMENT FIRST,ADD PRIMARY KEY IF NOT EXISTS (`id`)
SELECT * FROM kpi_report WHERE 1=0

View File

@@ -1,22 +0,0 @@
# file: log file name
# level: /trace/debug/info/error/warn/error/fatal, default: debug
# duration: saved days, default is 30 days
logger:
file: /usr/local/omc/log/captrace.log
level: warn
duration: 24
count: 10
gtp:
addr: :32152
database:
type: mysql
user: root
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: tenants_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True

View File

@@ -1,44 +0,0 @@
# file: log file name
# level: /trace/debug/info/warn/error/fatal, default: debug
# duration: saved days, default is 30 days
logger:
file: /usr/local/omc/log/crontask.log
level: warn
duration: 24
count: 90
omc:
name: OMC01
hosturi: http://127.0.0.1:33030
hostno: A001
province: ""
netabbr: HX
vendor: ""
tasks:
file: /usr/local/omc/etc/tasks.yaml
database:
type: mysql
user: root
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: tenants_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
# northbound interface, cm/pm
# duration(day): saved days
# zipPeriods(day): periods of zip pm data file
nbi:
cm:
cfgfiledir: /usr/local/omc/etc/cm
xmlfiledir: /opt/omc/ftp
version: V1.0.1
duration: 30
pm:
cfgfiledir: /usr/local/omc/etc/pm
xmlfiledir: /opt/omc/ftp
version: V1.0.1
duration: 30
zipPeriods: 1

View File

@@ -1,4 +0,0 @@
## Command Configuration
VENDORS=CoreNet_EMS
## Other

View File

@@ -44,7 +44,7 @@ database:
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: tenants_db
name: omc_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
backup: /usr/local/omc/database
@@ -69,15 +69,11 @@ redis:
# sleep: time delay for after write buffer (millisecond)
# deadLine: timeout for io read and write (second)
mml:
port: 4100
port2: 5002
sleep: 200
deadLine: 600
deadLine: 10
sizeRow: 600
sizeCol: 128
bufferSize: 65535
user: admin
password: admin
mmlHome: ./mmlhome
# Tracking configuration

View File

@@ -71,7 +71,7 @@ database:
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: tenants_db
name: omc_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
omc:

View File

@@ -1,183 +0,0 @@
# example:
# tasks:
# - name: test # task comment
# uri: # restful uri
# params: # params of url
# interval: 30 # do sometion in the interval
# unit: Seconds #Seconds/Minutes/Hours/Days/Weeks, Monday/Tuesday/.../Sunday,
# at: 00:10:00 # do at time such as xx:xx:xx
# do: HelloWorldTask # (Do what: callback function)
#
# Attention: must restart crontask after modified this file
#
tasks:
- name: test # task comment
status: Active #active/inactive
uri: # restful uri
params: # params of http url
body: # body of http request
interval: 60 # do sometion in the interval
unit: Seconds #Seconds/Minutes/Hours/Days/Weeks, Monday/Tuesday/.../Sunday,
at: 00:10:00 # do at time such as xx:xx:xx when unit such as Day/Days/Mondays...
do: TaskHelloWorld # (Do what: callback function)
- name: clear expired history alarm
status: Inactive
uri: /api/rest/databaseManagement/v1/tenants_db/alarm
params: WHERE=now()+>+ADDDATE(event_time,+interval+(SELECT+`value`+FROM+config+WHERE+config_tag='historyDuration')+day)+and+alarm_status='0'
interval: 1
unit: Days
at: 00:10:00
do: TaskDeleteExpiredRecord
- name: clear expired history gold_kpi
status: Inactive
uri: /api/rest/databaseManagement/v1/tenants_db/gold_kpi
params: WHERE=now()+>+ADDDATE(`date`,+interval+IFNULL((SELECT+`value`+FROM+config+WHERE+config_tag='goldKpiDuration'),7)+day)
interval: 1
unit: Days
at: 00:12:00
do: TaskDeleteExpiredRecord
- name: clear deleted custom pm kpi
uri: /api/rest/databaseManagement/v1/tenants_db/pm_custom_title
params: WHERE=now()+>+ADDDATE(update_time,+interval+(SELECT+`value`+FROM+config+WHERE+config_tag='keepPMCKpi')+day)+and+status='Deleted'
interval: 1
unit: Days
at: 00:15:00
do: TaskDeleteExpiredRecord
- name: update expired user session
status: Inactive
uri: /api/rest/databaseManagement/v1/tenants_db/session
params: WHERE=NOW()+>+ADDDATE(shake_time,+interval+expires+second)+and+status='online'
body: '{"session":{"status":"offline"}}'
interval: 30
unit: Seconds
at:
do: TaskUpdateTable
- name: clear expired log
status: Inactive
uri:
params:
interval: 1
unit: Days
at: 00:50:00
do: TaskDeleteExpiredRecord
- name: Backup measure data
uri: /api/rest/databaseManagement/v1/tenants_db/measure_data
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','date','task_id','ne_name','rm_uid','ne_type','granul_option','kpi_code','kpi_id','kpi_ext','start_time','end_time','value','timestamp'+union+select+id,date,task_id,ne_name,rm_uid,ne_type,granul_option,kpi_code,kpi_id,kpi_ext,start_time,end_time,value,timestamp+from+measure_data)+b
interval: 1
unit: Days
at: 00:20:00
do: TaskDBBackupCSVGetBySQL
- name: Backup operation log
uri: /api/rest/databaseManagement/v1/tenants_db/operation_log
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'op_id','account_name','op_ip','subsys_tag','op_type','op_content','op_result','begin_time','end_time','vnf_flag','log_time'+union+select+op_id,account_name,op_ip,subsys_tag,op_type,op_content,op_result,begin_time,end_time,vnf_flag,log_time+from+operation_log)+b
interval: 1
unit: Days
at: 00:26:00
do: TaskDBBackupCSVGetBySQL
- name: Backup security log
uri: /api/rest/databaseManagement/v1/tenants_db/security_log
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','account_name','account_type','op_ip','op_type','op_content','op_result','op_time'+union+select+id,account_name,account_type,op_ip,op_type,op_content,op_result,op_time+from+security_log)+b
interval: 1
unit: Days
at: 00:28:00
do: TaskDBBackupCSVGetBySQL
- name: Backup alarm log
uri: /api/rest/databaseManagement/v1/tenants_db/alarm_log
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','ne_type','ne_id','alarm_seq','alarm_id','alarm_code','alarm_status','event_time','log_time'+union+select+id,ne_type,ne_id,alarm_seq,alarm_id,alarm_code,alarm_status,event_time,log_time+from+alarm_log)+b
interval: 1
unit: Days
at: 00:30:00
do: TaskDBBackupCSVGetBySQL
- name: handshake to NF
status: Active
uri: /api/rest/systemManagement/v1/elementType/%s/objectType/systemState
params:
interval: 10
unit: Seconds
at:
do: TaskHandShakeToNF
- name: Export CM from NF
status: Inactive
uri: /api/rest/systemManagement/v1/elementType/%s/objectType/cm
params: ne_id=%s
interval: 1
unit: Days
at: 00:15
do: TaskExportCmFromNF
- name: Generate NRM xml file
uri:
params:
interval: 1
unit: Day
at: 00:00,06:00,12:00,18:00
do: GenCmXmlFile
- name: Task of Generate measure threshold alarm
status: Active
uri: /api/rest/faultManagement/v1/elementType/%s/objectType/alarms
params: 10200
interval: 10
unit: Seconds
at:
do: TaskGenMeasureThresholdAlarm
- name: Task of Generate license alarm
status: Inactive
uri: /api/rest/faultManagement/v1/elementType/%s/objectType/alarms
params: 10100 #alarm_code
interval: 1
unit: Days
at: 00:30
do: TaskGenLicenseAlarm
- name: Task of Generate NE system state alarm
status: Inactive
uri: /api/rest/faultManagement/v1/elementType/%s/objectType/alarms
params: 10000
interval: 5
unit: Seconds
at:
do: TaskGenNeStateAlarm
- name: Task of Generate Measure Report Timeout
status: Active
uri: /api/rest/faultManagement/v1/elementType/%s/objectType/alarms
params: 10201
interval: 10
unit: Seconds
at:
do: TaskGenMeasureReportTimeoutAlarm
- name: Monitor proces list and write system log
uri: /api/rest/databaseManagement/v1/tenants_db/system_log
params:
body:
interval: 10
unit: Seconds
at:
do: TaskWriteSystemLog
- name: Copy log to /opt/omc/ftp/log
uri:
params: cp -rf /usr/local/omc/database/*.csv /opt/omc/ftp/log
interval: 10
unit: Minutes
at:
do: TaskRunShellCommand
# - name: Import CM to NF
# uri: /api/rest/systemManagement/v1/elementType/udm/objectType/cm
# params: ne_id=SZ_01
# interval: 15
# unit: Seconds
# at:
# do: TaskImportCmToNF
crontab:
# - name: 每隔1分钟执行
# tab: 0 */1 * * * ? // crontab: rule like linux crontab
# do: CronHelloWorldTask // function name to call
# params:
- name: Generate PM xml file
status: Active
tab: 5,20,35,50 * * * *
do: GenPmXmlFile
uri: this is uri
params: Generating PM xml file
# - name: Import CM to NF
# tab: 0 * * * * *
# do: TaskImportCmToNF
# uri: /api/rest/systemManagement/v1/elementType/udm/objectType/cm
# params: ne_id=SZ_01

View File

@@ -1,71 +0,0 @@
server {
listen 44080;
listen 44443;
listen [::]:44080;
listen [::]:44443;
server_name localhost;
client_max_body_size 100M;
keepalive_timeout 180s;
#access_log /var/log/nginx/host.access.log main;
# ssl_certificate /usr/local/omc/etc/certs/omc-server.crt;
# ssl_certificate_key /usr/local/omc/etc/certs/omc-server.key;
# ssl_client_certificate /usr/local/omc/etc/certs/omc-ca.crt;
# ssl_verify_client on;
# ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
# ssl_session_timeout 5m;
# ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
# ssl_prefer_server_ciphers on;
# OMC
location / {
root /usr/local/omc/htdocs/front;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
location /omc-api/ {
proxy_pass http://127.0.0.1:33030/;
proxy_connect_timeout 180s;
proxy_send_timeout 180s;
proxy_read_timeout 180s;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
location /api/rest/ {
proxy_pass http://127.0.0.1:33030/api/rest/;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View File

@@ -1,221 +0,0 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- This XSLT will convert a PDML file, saved by Wireshark, into
HTML. The HTML page should look similar to Wireshark. See
https://gitlab.com/wireshark/wireshark/-/wikis/PDML for information
on how to generate such a HTML file from PDML.
For questions contact Dirk Jagdmann (doj@cubic.org).
Version: 2010-06-09
Wireshark - Network traffic analyzer
By Gerald Combs <gerald@wireshark.org>
Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
-->
<!-- set parameters of the HTML output -->
<xsl:output method="html" encoding="UTF-8" omit-xml-declaration="no" standalone="yes" indent="yes"/>
<!-- this matches the "field" tag -->
<xsl:template match="field">
&#160;&#160;&#160; <!-- indent with 3 non-breaking spaces -->
<!-- output either the "showname" or "show" attribute -->
<xsl:choose>
<xsl:when test="string-length(@showname)>0">
<xsl:value-of select="@showname"/><br/>
</xsl:when>
<xsl:otherwise>
<!--<xsl:value-of select="@name"/>:--> <xsl:value-of select="@show"/><br/>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates/> <!-- we expect to match "field" tags -->
</xsl:template>
<!-- this matches the "packet" tag -->
<xsl:template match="packet">
<!-- declare some variables for later use -->
<xsl:variable name="frame_num" select="proto[@name='frame']/field[@name='frame.number']/@show"/>
<xsl:variable name="frame_id" select="concat('f',$frame_num)"/>
<xsl:variable name="frame_c" select="concat($frame_id,'c')"/>
<!-- the "title" bar of the frame -->
<div width="100%" id="{$frame_id}">
<a href="javascript:toggle_node('{$frame_c}')">&#8658;</a> <!-- #8658 is a "rArr" (double right arrow) character -->
Frame <xsl:value-of select="$frame_num"/>:
<xsl:for-each select="proto[@name!='geninfo']">
<xsl:value-of select="@name"/>,
</xsl:for-each>
<small><a href="javascript:hide_node('{$frame_id}')">[X]</a></small>
</div>
<!-- the frame contents are stored in a div, so we can toggle it -->
<div width="100%" id="{$frame_c}" style="display:none">
<!-- loop through all proto tags, but skip the "geninfo" one -->
<xsl:for-each select="proto[@name!='geninfo']">
<xsl:variable name="proto" select="concat($frame_id,@name,count(preceding-sibling::proto)+1)"/>
<!-- the "title" bar of the proto -->
<div width="100%" style="background-color:#e5e5e5; margin-bottom: 2px">
&#160;<a href="javascript:toggle_node('{$proto}')">&#8658;</a>&#160;<xsl:value-of select="@showname"/>
<!-- print "proto" details inside another div -->
<div width="100%" id="{$proto}" style="display:none">
<xsl:apply-templates/> <!-- we expect to match "field" tags -->
</div>
</div>
</xsl:for-each>
</div>
<!-- use the javascript function set_node_color() to set the color
of the frame title bar. Defer colorization until the full page has
been loaded. If the browser would support the XPath function
replace() we could simply set the class attribute of the title bar div,
but for now we're stuck with class names from Wireshark's colorfilters
that contain spaces and we can't handle them in CSS. -->
<script type="text/javascript">
dojo.addOnLoad(function(){
set_node_color(
'<xsl:value-of select="$frame_id"/>',
'<xsl:value-of select="proto[@name='frame']/field[@name='frame.coloring_rule.name']/@show"/>'
);
});
</script>
</xsl:template>
<xsl:template match="pdml">
Capture Filename: <b><xsl:value-of select="@capture_file"/></b>
PDML created: <b><xsl:value-of select="@time"/></b>
<tt>
<xsl:apply-templates/> <!-- we expect to match the "packet" nodes -->
</tt>
</xsl:template>
<!-- this block matches the start of the PDML file -->
<xsl:template match="/">
<html>
<head>
<title>poor man's Wireshark</title>
<script src="https://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js" type="text/javascript"></script>
<script type="text/javascript">
function set_node(node, str)
{
if(dojo.isString(node))
node = dojo.byId(node);
if(!node) return;
node.style.display = str;
}
function toggle_node(node)
{
if(dojo.isString(node))
node = dojo.byId(node);
if(!node) return;
set_node(node, (node.style.display != 'none') ? 'none' : 'block');
}
function hide_node(node)
{
set_node(node, 'none');
}
// this function was generated by colorfilters2js.pl
function set_node_color(node,colorname)
{
if(dojo.isString(node))
node = dojo.byId(node);
if(!node) return;
var fg;
var bg;
if(colorname == 'Bad TCP') {
bg='#000000';
fg='#ff5f5f';
}
if(colorname == 'HSRP State Change') {
bg='#000000';
fg='#fff600';
}
if(colorname == 'Spanning Tree Topology Change') {
bg='#000000';
fg='#fff600';
}
if(colorname == 'OSPF State Change') {
bg='#000000';
fg='#fff600';
}
if(colorname == 'ICMP errors') {
bg='#000000';
fg='#00ff0e';
}
if(colorname == 'ARP') {
bg='#d6e8ff';
fg='#000000';
}
if(colorname == 'ICMP') {
bg='#c2c2ff';
fg='#000000';
}
if(colorname == 'TCP RST') {
bg='#900000';
fg='#fff680';
}
if(colorname == 'TTL low or unexpected') {
bg='#900000';
fg='#ffffff';
}
if(colorname == 'Checksum Errors') {
bg='#000000';
fg='#ff5f5f';
}
if(colorname == 'SMB') {
bg='#fffa99';
fg='#000000';
}
if(colorname == 'HTTP') {
bg='#8dff7f';
fg='#000000';
}
if(colorname == 'IPX') {
bg='#ffe3e5';
fg='#000000';
}
if(colorname == 'DCERPC') {
bg='#c797ff';
fg='#000000';
}
if(colorname == 'Routing') {
bg='#fff3d6';
fg='#000000';
}
if(colorname == 'TCP SYN/FIN') {
bg='#a0a0a0';
fg='#000000';
}
if(colorname == 'TCP') {
bg='#e7e6ff';
fg='#000000';
}
if(colorname == 'UDP') {
bg='#70e0ff';
fg='#000000';
}
if(colorname == 'Broadcast') {
bg='#ffffff';
fg='#808080';
}
if(fg.length > 0)
node.style.color = fg;
if(bg.length > 0)
node.style.background = bg;
}
</script>
</head>
<body>
<xsl:apply-templates/> <!-- we expect to match the "pdml" node -->
</body>
</html>
</xsl:template>
</xsl:stylesheet>

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

View File

@@ -0,0 +1,2 @@
export default {
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@@ -1,5 +1,5 @@
Package: OMC
Version: 2.2410.2-YYYYMMDD
Version: 2.2503.6-YYYYMMDD
Section: AGrandTech
Prioritt: optional
Architecture: amd64

View File

@@ -4,38 +4,25 @@ OMCRootDir=/usr/local/omc
SystemdRootDir=/lib/systemd/system
OMCEtcDir=${OMCRootDir}/etc
FERootDir=${OMCRootDir}/htdocs/front
X86Lib64Dir=/lib/x86_64-linux-gnu
OMCBinDir=${OMCRootDir}/bin
OmcBinDir=${OMCRootDir}/bin
OMCStaticDir=${OMCRootDir}/static
UsrLocalBinDir=/usr/local/bin
OMCDaemon=omcd
OmcDaemon=omcd
NginxEtcDir=/etc/nginx
NginxConfDir=${NginxEtcDir}/conf.d
CFileList="restconf.yaml crontask.yaml tasks.yaml sshsvc.yaml capconf.yaml omc.conf"
CFileList="restconf.yaml sshsvc.yaml omc.conf"
LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png"
echo ""
echo "* To start/stop/restart/status omc service, please run:"
echo " sudo systemctl start/stop/restart/status restagent.service"
echo " sudo systemctl start/stop/restart/status crontask.service"
echo " sudo systemctl start/stop/restart/status sshsvc.service"
echo " sudo systemctl start/stop/restart/status captrace.service"
echo " or run: "
echo " sudo /usr/local/omc/bin/omcsvc.sh start/stop/restart/status"
echo ""
cd ${X86Lib64Dir}
chmod +rx libwireshark.so.15.0.12
if [ ! -e libwireshark.so.15 ]; then ln -s libwireshark.so.15.0.12 libwireshark.so.15; fi
if [ ! -e libwireshark.so ]; then ln -s libwireshark.so.15.0.12 libwireshark.so; fi
chmod +rx libwiretap.so.12.0.12
if [ ! -e libwiretap.so.12 ]; then ln -s libwiretap.so.12.0.12 libwiretap.so.12; fi
if [ ! -e libwiretap.so ]; then ln -s libwiretap.so.12.0.12 libwiretap.so; fi
chmod +rx libwsutil.so.13.1.0
if [ ! -e libwsutil.so.13 ]; then ln -s libwsutil.so.13.1.0 libwsutil.so.13; fi
if [ ! -e libwsutil.so ]; then ln -s libwsutil.so.13.1.0 libwsutil.so; fi
cd ${UsrLocalBinDir}
if [ ! -e ${OMCDaemon} ]; then ln -s ${OMCBinDir}/omcsvc.sh ${OMCDaemon}; fi
if [ ! -e ${OmcDaemon} ]; then ln -s ${OmcBinDir}/omcsvc.sh ${OmcDaemon}; fi
chmod +rx ${OMCRootDir}/bin/*
chmod +rx ${OMCRootDir}/*
@@ -54,62 +41,6 @@ for CFile in ${CFileList}; do
fi
done
# # Install redis db if not exist /usr/local/db
# if [ ! -e "${RedisRootDir}/bin/kvdb-server" ]; then
# # if [ ! -e "${RedisRootDir}" ]; then
# # mkdir -p ${RedisRootDir}
# # fi
# # stop old adb service
# if [ -e "${RedisOldRootDir}/bin/redis-server" ] && [ -e "${SystemdRootDir}/adb.service" ]; then
# systemctl stop adb.service
# systemctl disable adb.service
# fi
# # stop adb service
# if [ -e "${UsrLocalBinDir}/adb-server" ] && [ -e "${SystemdRootDir}/adb.service" ]; then
# systemctl stop adb.service
# systemctl disable adb.service
# fi
# cp -rf ${DependsRootDir}/kvdb/* /
# chmod +rx ${RedisRootDir}/bin/kvdb*
# if [ ! -e "${RedisConfDir}/kvdb.conf" ]; then
# cp ${RedisConfDir}/default/kvdb.conf ${RedisConfDir}
# fi
# sed -i 's/replica-read-only yes/replica-read-only no/g' ${RedisConfDir}/kvdb.conf
# LINE="masterauth helloearth"
# FILE="${RedisConfDir}/kvdb.conf"
# # 检查文件中是否存在该行
# if ! grep -qxF "$LINE" "$FILE"; then
# # 如果不存在,将其添加到文件末尾
# echo "$LINE" >> "$FILE"
# fi
# # copy the old adb dump.rdb
# if [ -e "${RedisOldRootDir}/bin/conf/dump.rdb" ] && [ ! -e "${RedisRootDir}/etc/kvdb/dump.rdb" ]; then
# cp -f ${RedisOldRootDir}/bin/conf/dump.rdb ${RedisRootDir}/etc/kvdb/;
# mv -f ${RedisRootDir}/db ${RedisRootDir}/adb.old
# fi
# # copy the adb dump.rdb
# if [ -e "${RedisRootDir}/etc/adb/dump.rdb" ] && [ ! -e "${RedisRootDir}/etc/kvdb/dump.rdb" ]; then
# cp -f ${RedisRootDir}/etc/adb/dump.rdb ${RedisRootDir}/etc/kvdb/;
# mv -f ${RedisRootDir}/etc/adb ${RedisRootDir}/etc/adb.old
# fi
# # cp -f ${DependsRootDir}/systemd/kvdb.service ${SystemdRootDir}
# else
# if [ ! -e "${RedisConfDir}/kvdb.conf" ]; then
# cp ${RedisConfDir}/default/kvdb.conf ${RedisConfDir}
# fi
# sed -i 's/replica-read-only yes/replica-read-only no/g' ${RedisConfDir}/kvdb.conf
# LINE="masterauth helloearth"
# FILE="${RedisConfDir}/kvdb.conf"
# # 检查文件中是否存在该行
# if ! grep -qxF "$LINE" "$FILE"; then
# # 如果不存在,将其添加到文件末尾
# echo "$LINE" >> "$FILE"
# fi
# fi
if [ ! -e "${FERootDir}/config.js" ]; then
cp ${FERootDir}/default/config.js ${FERootDir};
fi
@@ -138,9 +69,7 @@ systemctl daemon-reload
systemctl disable --now unattended-upgrades
systemctl enable restagent.service
systemctl enable crontask.service
systemctl enable sshsvc.service
systemctl enable captrace.service
systemctl daemon-reload
@@ -161,8 +90,6 @@ if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
fi
echo -n "Starting OMC service ... "
systemctl start crontask.service
systemctl start sshsvc.service
systemctl start captrace.service
systemctl start restagent.service
echo "done"

View File

@@ -1,13 +1,5 @@
# !/bin/bash
X86Lib64Dir=/lib/x86_64-linux-gnu
rm -rf ${X86Lib64Dir}/libwireshark.so.15
rm -rf ${X86Lib64Dir}/libwireshark.so
rm -rf ${X86Lib64Dir}/libwiretap.so.12
rm -rf ${X86Lib64Dir}/libwiretap.so
rm -rf ${X86Lib64Dir}/libwsutil.so.13
rm -rf ${X86Lib64Dir}/libwsutil.so
#rm -rf /usr/local/omc
rm -rf /etc/nginx/conf.d/omc.conf
rm -f /usr/local/bin/omcd
@@ -17,15 +9,11 @@ systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
fi
systemctl disable restagent.service
systemctl disable crontask.service
systemctl disable sshsvc.service
systemctl disable captrace.service
systemctl daemon-reload

View File

@@ -4,9 +4,7 @@ systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
fi

View File

@@ -1,49 +0,0 @@
ManagedElement:
Id: ""
UserLabel: ""
VendorName: ""
ManagedBy: ""
ManagementIpAddress: ""
SwVersion: ""
PatchInfo: ""
AdministrativeState: ""
OperationalState: ""
AmfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
SbiServiceList: ""
AmfGuamiList: ""
SnssaiList: ""
MaxUser: ""
RelativeCapacity: ""
MaxGnbNum: ""
EpRpDynN8Amf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
EpRpDynN11Amf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
EpRpDynN12Amf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
IPResource:
Id: ""
UserLabel: ""
InterfaceType: ""
LocIpV4AddrList: ""
LocIpV6AddrList: ""

View File

@@ -1,48 +0,0 @@
ManagedElement:
Id: ""
UserLabel: ""
VendorName: ""
ManagedBy: ""
ManagementIpAddress: ""
SwVersion: ""
PatchInfo: ""
AdministrativeState: ""
OperationalState: ""
SmfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
SbiServiceList: ""
MaxPduSessions: ""
MaxQfi: ""
UpfList: ""
AddrPool:
Id: ""
UserLabel: ""
AddrType: "Static"
IpVersion: ""
AddrSegList: ""
EpRpDynN7Smf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
EpRpDynN10Smf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
IPResource:
Id: ""
UserLabel: ""
InterfaceType: ""
LocIpV4AddrList: ""
LocIpV6AddrList: ""

View File

@@ -1,39 +0,0 @@
ManagedElement:
Id: ""
UserLabel: ""
VendorName: ""
ManagedBy: ""
ManagementIpAddress: ""
SwVersion: ""
PatchInfo: ""
AdministrativeState: ""
OperationalState: ""
UdmFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
SbiServiceList: ""
UdrFunction:
Id: ""
UserLabel: ""
AddrType: "Static"
IpVersion: ""
AddrSegList: ""
AusfFunction:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
IPResource:
Id: ""
UserLabel: ""
InterfaceType: ""
LocIpV4AddrList: ""
LocIpV6AddrList: ""

View File

@@ -1,141 +0,0 @@
ManagedElement:
Id: ""
UserLabel: ""
VendorName: ""
ManagedBy: ""
ManagementIpAddress: ""
SwVersion: ""
PatchInfo: ""
AdministrativeState: ""
OperationalState: ""
InventoryUnitRack:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
SbiServiceList: ""
MaxPduSessions: ""
MaxQfi: ""
UpfList: ""
InventoryUnitShelf:
Id: ""
UserLabel: ""
VendorUnitFamilyType: ""
VendorUnitTypeNumber: ""
VendorName: ""
SerialNumber: ""
VersionNumber: ""
DateOfManufacture: ""
DateOfLastService: ""
ManufacturerData: ""
RackPosition: ""
InventoryUnitPack:
Id: ""
UserLabel: ""
VendorUnitFamilyType: ""
VendorUnitTypeNumber: ""
VendorName: ""
SerialNumber: ""
VersionNumber: ""
DateOfManufacture: ""
DateOfLastService: ""
ManufacturerData: ""
PortsInformation: ""
PackPosition: ""
SlotsOccupied: ""
InventoryUnitHost:
Id: ""
UserLabel: ""
VendorUnitFamilyType: ""
VendorUnitTypeNumber: ""
VendorName: ""
SerialNumber: ""
VersionNumber: ""
DateOfManufacture: ""
DateOfLastService: ""
ManufacturerData: ""
HostPosition: ""
NumberOfCpu: ""
MemSize: ""
HardDiskSize: ""
InventoryUnitAccessory:
Id: ""
UserLabel: ""
VendorUnitFamilyType: ""
VendorUnitTypeNumber: ""
VendorName: ""
SerialNumber: ""
VersionNumber: ""
DateOfManufacture: ""
DateOfLastService: ""
ManufacturerData: ""
AccessoryPosition: ""
AccessoryType: ""
AddtionalInformation: ""
UpfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
MaxQosFlows: ""
MaxThroughput: ""
EpRpDynN9Upf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
EpRpDynN3Upf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
AmfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
SmfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
UdrFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
AusfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
IPResource:
Id: ""
UserLabel: ""
InterfaceType: ""
LocIpV4AddrList: ""
LocIpV6AddrList: ""

View File

@@ -1,22 +0,0 @@
# file: log file name
# level: /trace/debug/info/error/warn/error/fatal, default: debug
# duration: saved days, default is 30 days
logger:
file: /usr/local/omc/log/captrace.log
level: warn
duration: 24
count: 10
gtp:
addr: :32152
database:
type: mysql
user: root
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: tenants_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True

View File

@@ -1,44 +0,0 @@
# file: log file name
# level: /trace/debug/info/warn/error/fatal, default: debug
# duration: saved days, default is 30 days
logger:
file: /usr/local/omc/log/crontask.log
level: warn
duration: 24
count: 90
omc:
name: OMC01
hosturi: http://127.0.0.1:33030
hostno: A001
province: ""
netabbr: HX
vendor: ""
tasks:
file: /usr/local/omc/etc/tasks.yaml
database:
type: mysql
user: root
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: tenants_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
# northbound interface, cm/pm
# duration(day): saved days
# zipPeriods(day): periods of zip pm data file
nbi:
cm:
cfgfiledir: /usr/local/omc/etc/cm
xmlfiledir: /opt/omc/ftp
version: V1.0.1
duration: 30
pm:
cfgfiledir: /usr/local/omc/etc/pm
xmlfiledir: /opt/omc/ftp
version: V1.0.1
duration: 30
zipPeriods: 1

View File

@@ -1,4 +0,0 @@
## Command Configuration
VENDORS=CoreNet_EMS
## Other

View File

@@ -44,7 +44,7 @@ database:
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: tenants_db
name: omc_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
backup: /usr/local/omc/database
@@ -70,7 +70,7 @@ redis:
# deadLine: timeout for io read and write (second)
mml:
sleep: 200
deadLine: 600
deadLine: 10
sizeRow: 600
sizeCol: 128
bufferSize: 65535

View File

@@ -1,87 +0,0 @@
# file: log file name
# level: /trace/debug/info/warn/error/fatal, default: debug
# duration: rotation time with xx hours, example: 1/12/24 hours
# count: rotation count of log, default is 30 rotation
logger:
file: /usr/local/omc/log/sshsvc.log
level: warn
duration: 24
count: 30
# file: MML log file name
# duration: rotation time with xx hours, example: 1/12/24 hours
# count: rotation count of log, default is 30 rotation
# level: cmd/ret log cmd/log cmd & result
logmml:
file: /usr/local/omc/mmllog/omcmml.log
duration: 24
count: 30
level: cmd
# ssh service listen ipv4/v6 and port, support multiple routines
# ip: 0.0.0.0 or ::0, support IPv4/v6
# session: single/multiple session for one user
sshd:
listenAddr: 0.0.0.0
listenPort: 32222
privateKey: /usr/local/omc/.ssh/id_rsa
maxConnNum: 2
timeout: 1800
session: multiple
mmlHome: /usr/local/omc/mmlhome
userName: manager
password: pass123
authType: local
tagNE: omc
# authType: local/omc
telnetServer:
listenAddr: 0.0.0.0
listenPort: 32323
maxConnNum: 2
timeout: 1800
session: multiple
mmlHome: /usr/local/omc/mmlhome
userName: manager
password: pass123
authType: local
tagNE: omc
# authproto: NoAuth/MD5/SHA
# privProto: NoPriv/DES/AES/AES192/AES256
snmpServer:
listenAddr: '[::]'
listenPort: 34957
userName: manager
authPass: pass123
authproto: MD5
privPass: "3F2A1B4C5D6E7F8A9B0C1D2E3F4A5B6C7D8E9F0A1B2C3D4E"
privProto: DES
engineID: "8000000004323030313a6462383a3a39313636"
trapPort: 34958
trapListen: false
trapBool: false
trapTick: 60
timeOut: 5
trapTarget: ""
database:
type: mysql
user: root
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: tenants_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
omc:
httpUri: http://127.0.0.1:33030
userCrypt: bcrypt
ne:
port: 4100
sleep: 200
user: admin
password: admin

View File

@@ -1,183 +0,0 @@
# example:
# tasks:
# - name: test # task comment
# uri: # restful uri
# params: # params of url
# interval: 30 # do sometion in the interval
# unit: Seconds #Seconds/Minutes/Hours/Days/Weeks, Monday/Tuesday/.../Sunday,
# at: 00:10:00 # do at time such as xx:xx:xx
# do: HelloWorldTask # (Do what: callback function)
#
# Attention: must restart crontask after modified this file
#
tasks:
- name: test # task comment
status: Active #active/inactive
uri: # restful uri
params: # params of http url
body: # body of http request
interval: 60 # do sometion in the interval
unit: Seconds #Seconds/Minutes/Hours/Days/Weeks, Monday/Tuesday/.../Sunday,
at: 00:10:00 # do at time such as xx:xx:xx when unit such as Day/Days/Mondays...
do: TaskHelloWorld # (Do what: callback function)
- name: clear expired history alarm
status: Inactive
uri: /api/rest/databaseManagement/v1/tenants_db/alarm
params: WHERE=now()+>+ADDDATE(event_time,+interval+(SELECT+`value`+FROM+config+WHERE+config_tag='historyDuration')+day)+and+alarm_status='0'
interval: 1
unit: Days
at: 00:10:00
do: TaskDeleteExpiredRecord
- name: clear expired history gold_kpi
status: Inactive
uri: /api/rest/databaseManagement/v1/tenants_db/gold_kpi
params: WHERE=now()+>+ADDDATE(`date`,+interval+IFNULL((SELECT+`value`+FROM+config+WHERE+config_tag='goldKpiDuration'),7)+day)
interval: 1
unit: Days
at: 00:12:00
do: TaskDeleteExpiredRecord
- name: clear deleted custom pm kpi
uri: /api/rest/databaseManagement/v1/tenants_db/pm_custom_title
params: WHERE=now()+>+ADDDATE(update_time,+interval+(SELECT+`value`+FROM+config+WHERE+config_tag='keepPMCKpi')+day)+and+status='Deleted'
interval: 1
unit: Days
at: 00:15:00
do: TaskDeleteExpiredRecord
- name: update expired user session
status: Inactive
uri: /api/rest/databaseManagement/v1/tenants_db/session
params: WHERE=NOW()+>+ADDDATE(shake_time,+interval+expires+second)+and+status='online'
body: '{"session":{"status":"offline"}}'
interval: 30
unit: Seconds
at:
do: TaskUpdateTable
- name: clear expired log
status: Inactive
uri:
params:
interval: 1
unit: Days
at: 00:50:00
do: TaskDeleteExpiredRecord
- name: Backup measure data
uri: /api/rest/databaseManagement/v1/tenants_db/measure_data
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','date','task_id','ne_name','rm_uid','ne_type','granul_option','kpi_code','kpi_id','kpi_ext','start_time','end_time','value','timestamp'+union+select+id,date,task_id,ne_name,rm_uid,ne_type,granul_option,kpi_code,kpi_id,kpi_ext,start_time,end_time,value,timestamp+from+measure_data)+b
interval: 1
unit: Days
at: 00:20:00
do: TaskDBBackupCSVGetBySQL
- name: Backup operation log
uri: /api/rest/databaseManagement/v1/tenants_db/operation_log
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'op_id','account_name','op_ip','subsys_tag','op_type','op_content','op_result','begin_time','end_time','vnf_flag','log_time'+union+select+op_id,account_name,op_ip,subsys_tag,op_type,op_content,op_result,begin_time,end_time,vnf_flag,log_time+from+operation_log)+b
interval: 1
unit: Days
at: 00:26:00
do: TaskDBBackupCSVGetBySQL
- name: Backup security log
uri: /api/rest/databaseManagement/v1/tenants_db/security_log
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','account_name','account_type','op_ip','op_type','op_content','op_result','op_time'+union+select+id,account_name,account_type,op_ip,op_type,op_content,op_result,op_time+from+security_log)+b
interval: 1
unit: Days
at: 00:28:00
do: TaskDBBackupCSVGetBySQL
- name: Backup alarm log
uri: /api/rest/databaseManagement/v1/tenants_db/alarm_log
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','ne_type','ne_id','alarm_seq','alarm_id','alarm_code','alarm_status','event_time','log_time'+union+select+id,ne_type,ne_id,alarm_seq,alarm_id,alarm_code,alarm_status,event_time,log_time+from+alarm_log)+b
interval: 1
unit: Days
at: 00:30:00
do: TaskDBBackupCSVGetBySQL
- name: handshake to NF
status: Active
uri: /api/rest/systemManagement/v1/elementType/%s/objectType/systemState
params:
interval: 10
unit: Seconds
at:
do: TaskHandShakeToNF
- name: Export CM from NF
status: Inactive
uri: /api/rest/systemManagement/v1/elementType/%s/objectType/cm
params: ne_id=%s
interval: 1
unit: Days
at: 00:15
do: TaskExportCmFromNF
- name: Generate NRM xml file
uri:
params:
interval: 1
unit: Day
at: 00:00,06:00,12:00,18:00
do: GenCmXmlFile
- name: Task of Generate measure threshold alarm
status: Active
uri: /api/rest/faultManagement/v1/elementType/%s/objectType/alarms
params: 10200
interval: 10
unit: Seconds
at:
do: TaskGenMeasureThresholdAlarm
- name: Task of Generate license alarm
status: Inactive
uri: /api/rest/faultManagement/v1/elementType/%s/objectType/alarms
params: 10100 #alarm_code
interval: 1
unit: Days
at: 00:30
do: TaskGenLicenseAlarm
- name: Task of Generate NE system state alarm
status: Inactive
uri: /api/rest/faultManagement/v1/elementType/%s/objectType/alarms
params: 10000
interval: 5
unit: Seconds
at:
do: TaskGenNeStateAlarm
- name: Task of Generate Measure Report Timeout
status: Active
uri: /api/rest/faultManagement/v1/elementType/%s/objectType/alarms
params: 10201
interval: 10
unit: Seconds
at:
do: TaskGenMeasureReportTimeoutAlarm
- name: Monitor proces list and write system log
uri: /api/rest/databaseManagement/v1/tenants_db/system_log
params:
body:
interval: 10
unit: Seconds
at:
do: TaskWriteSystemLog
- name: Copy log to /opt/omc/ftp/log
uri:
params: cp -rf /usr/local/omc/database/*.csv /opt/omc/ftp/log
interval: 10
unit: Minutes
at:
do: TaskRunShellCommand
# - name: Import CM to NF
# uri: /api/rest/systemManagement/v1/elementType/udm/objectType/cm
# params: ne_id=SZ_01
# interval: 15
# unit: Seconds
# at:
# do: TaskImportCmToNF
crontab:
# - name: 每隔1分钟执行
# tab: 0 */1 * * * ? // crontab: rule like linux crontab
# do: CronHelloWorldTask // function name to call
# params:
- name: Generate PM xml file
status: Active
tab: 5,20,35,50 * * * *
do: GenPmXmlFile
uri: this is uri
params: Generating PM xml file
# - name: Import CM to NF
# tab: 0 * * * * *
# do: TaskImportCmToNF
# uri: /api/rest/systemManagement/v1/elementType/udm/objectType/cm
# params: ne_id=SZ_01

View File

@@ -1,71 +0,0 @@
server {
listen 44080;
listen 44443;
listen [::]:44080;
listen [::]:44443;
server_name localhost;
client_max_body_size 100M;
keepalive_timeout 180s;
#access_log /var/log/nginx/host.access.log main;
# ssl_certificate /usr/local/omc/etc/certs/omc-server.crt;
# ssl_certificate_key /usr/local/omc/etc/certs/omc-server.key;
# ssl_client_certificate /usr/local/omc/etc/certs/omc-ca.crt;
# ssl_verify_client on;
# ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
# ssl_session_timeout 5m;
# ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
# ssl_prefer_server_ciphers on;
# OMC
location / {
root /usr/local/omc/htdocs/front;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
location /omc-api/ {
proxy_pass http://127.0.0.1:33030/;
proxy_connect_timeout 180s;
proxy_send_timeout 180s;
proxy_read_timeout 180s;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
location /api/rest/ {
proxy_pass http://127.0.0.1:33030/api/rest/;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View File

@@ -1,76 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="DataFile">
<xs:complexType>
<xs:sequence>
<xs:element name="FileHeader">
<xs:complexType>
<xs:sequence>
<xs:element name="TimeStamp" type="xs:dateTime"/>
<xs:element name="TimeZone" type="xs:string"/>
<xs:element name="VendorName" type="xs:string" minOccurs="0"/>
<xs:element name="ElementType" type="xs:string" minOccurs="0"/>
<xs:element name="CmVersion" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Objects" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="ObjectType" type="xs:string"/>
<!--该字段必选-->
<xs:element name="FieldName">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="N">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="i" type="xs:integer" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="FieldValue">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="Object">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="V">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="i" type="xs:integer" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="rmUID" type="xs:string" use="required"/>
<xs:attribute name="Dn" type="xs:string"/>
<!-- //无线、核心网专业该字段必选传输、IP专业、业务系统无该字段-->
<xs:attribute name="UserLabel" type="xs:string"/>
<!-- //无线、核心网专业该字段必选传输、IP专业、业务系统无该字段-->
<xs:attribute name="PVFlag" type="xs:string" use="required"/>
<!-- //必须-->
<xs:attribute name="VMID" type="xs:string"/>
<!-- //VNF网络或VNF和PNF混合组网虚拟网元必选物理网元无该字段-->
<xs:attribute name="VNFInstanceID" type="xs:string"/>
<!-- //VNF网络或VNF和PNF混合组网虚拟网元必选物理网元无该字段-->
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@@ -1,221 +0,0 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- This XSLT will convert a PDML file, saved by Wireshark, into
HTML. The HTML page should look similar to Wireshark. See
https://gitlab.com/wireshark/wireshark/-/wikis/PDML for information
on how to generate such a HTML file from PDML.
For questions contact Dirk Jagdmann (doj@cubic.org).
Version: 2010-06-09
Wireshark - Network traffic analyzer
By Gerald Combs <gerald@wireshark.org>
Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
-->
<!-- set parameters of the HTML output -->
<xsl:output method="html" encoding="UTF-8" omit-xml-declaration="no" standalone="yes" indent="yes"/>
<!-- this matches the "field" tag -->
<xsl:template match="field">
&#160;&#160;&#160; <!-- indent with 3 non-breaking spaces -->
<!-- output either the "showname" or "show" attribute -->
<xsl:choose>
<xsl:when test="string-length(@showname)>0">
<xsl:value-of select="@showname"/><br/>
</xsl:when>
<xsl:otherwise>
<!--<xsl:value-of select="@name"/>:--> <xsl:value-of select="@show"/><br/>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates/> <!-- we expect to match "field" tags -->
</xsl:template>
<!-- this matches the "packet" tag -->
<xsl:template match="packet">
<!-- declare some variables for later use -->
<xsl:variable name="frame_num" select="proto[@name='frame']/field[@name='frame.number']/@show"/>
<xsl:variable name="frame_id" select="concat('f',$frame_num)"/>
<xsl:variable name="frame_c" select="concat($frame_id,'c')"/>
<!-- the "title" bar of the frame -->
<div width="100%" id="{$frame_id}">
<a href="javascript:toggle_node('{$frame_c}')">&#8658;</a> <!-- #8658 is a "rArr" (double right arrow) character -->
Frame <xsl:value-of select="$frame_num"/>:
<xsl:for-each select="proto[@name!='geninfo']">
<xsl:value-of select="@name"/>,
</xsl:for-each>
<small><a href="javascript:hide_node('{$frame_id}')">[X]</a></small>
</div>
<!-- the frame contents are stored in a div, so we can toggle it -->
<div width="100%" id="{$frame_c}" style="display:none">
<!-- loop through all proto tags, but skip the "geninfo" one -->
<xsl:for-each select="proto[@name!='geninfo']">
<xsl:variable name="proto" select="concat($frame_id,@name,count(preceding-sibling::proto)+1)"/>
<!-- the "title" bar of the proto -->
<div width="100%" style="background-color:#e5e5e5; margin-bottom: 2px">
&#160;<a href="javascript:toggle_node('{$proto}')">&#8658;</a>&#160;<xsl:value-of select="@showname"/>
<!-- print "proto" details inside another div -->
<div width="100%" id="{$proto}" style="display:none">
<xsl:apply-templates/> <!-- we expect to match "field" tags -->
</div>
</div>
</xsl:for-each>
</div>
<!-- use the javascript function set_node_color() to set the color
of the frame title bar. Defer colorization until the full page has
been loaded. If the browser would support the XPath function
replace() we could simply set the class attribute of the title bar div,
but for now we're stuck with class names from Wireshark's colorfilters
that contain spaces and we can't handle them in CSS. -->
<script type="text/javascript">
dojo.addOnLoad(function(){
set_node_color(
'<xsl:value-of select="$frame_id"/>',
'<xsl:value-of select="proto[@name='frame']/field[@name='frame.coloring_rule.name']/@show"/>'
);
});
</script>
</xsl:template>
<xsl:template match="pdml">
Capture Filename: <b><xsl:value-of select="@capture_file"/></b>
PDML created: <b><xsl:value-of select="@time"/></b>
<tt>
<xsl:apply-templates/> <!-- we expect to match the "packet" nodes -->
</tt>
</xsl:template>
<!-- this block matches the start of the PDML file -->
<xsl:template match="/">
<html>
<head>
<title>poor man's Wireshark</title>
<script src="https://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js" type="text/javascript"></script>
<script type="text/javascript">
function set_node(node, str)
{
if(dojo.isString(node))
node = dojo.byId(node);
if(!node) return;
node.style.display = str;
}
function toggle_node(node)
{
if(dojo.isString(node))
node = dojo.byId(node);
if(!node) return;
set_node(node, (node.style.display != 'none') ? 'none' : 'block');
}
function hide_node(node)
{
set_node(node, 'none');
}
// this function was generated by colorfilters2js.pl
function set_node_color(node,colorname)
{
if(dojo.isString(node))
node = dojo.byId(node);
if(!node) return;
var fg;
var bg;
if(colorname == 'Bad TCP') {
bg='#000000';
fg='#ff5f5f';
}
if(colorname == 'HSRP State Change') {
bg='#000000';
fg='#fff600';
}
if(colorname == 'Spanning Tree Topology Change') {
bg='#000000';
fg='#fff600';
}
if(colorname == 'OSPF State Change') {
bg='#000000';
fg='#fff600';
}
if(colorname == 'ICMP errors') {
bg='#000000';
fg='#00ff0e';
}
if(colorname == 'ARP') {
bg='#d6e8ff';
fg='#000000';
}
if(colorname == 'ICMP') {
bg='#c2c2ff';
fg='#000000';
}
if(colorname == 'TCP RST') {
bg='#900000';
fg='#fff680';
}
if(colorname == 'TTL low or unexpected') {
bg='#900000';
fg='#ffffff';
}
if(colorname == 'Checksum Errors') {
bg='#000000';
fg='#ff5f5f';
}
if(colorname == 'SMB') {
bg='#fffa99';
fg='#000000';
}
if(colorname == 'HTTP') {
bg='#8dff7f';
fg='#000000';
}
if(colorname == 'IPX') {
bg='#ffe3e5';
fg='#000000';
}
if(colorname == 'DCERPC') {
bg='#c797ff';
fg='#000000';
}
if(colorname == 'Routing') {
bg='#fff3d6';
fg='#000000';
}
if(colorname == 'TCP SYN/FIN') {
bg='#a0a0a0';
fg='#000000';
}
if(colorname == 'TCP') {
bg='#e7e6ff';
fg='#000000';
}
if(colorname == 'UDP') {
bg='#70e0ff';
fg='#000000';
}
if(colorname == 'Broadcast') {
bg='#ffffff';
fg='#808080';
}
if(fg.length > 0)
node.style.color = fg;
if(bg.length > 0)
node.style.background = bg;
}
</script>
</head>
<body>
<xsl:apply-templates/> <!-- we expect to match the "pdml" node -->
</body>
</html>
</xsl:template>
</xsl:stylesheet>

View File

@@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="PmFile">
<xs:complexType>
<xs:sequence>
<xs:element name="FileHeader">
<xs:complexType>
<xs:sequence>
<xs:element name="TimeStamp" type="xs:dateTime" />
<xs:element name="TimeZone" type="xs:string" />
<xs:element name="Period" type="xs:integer" />
<xs:element name="VendorName" type="xs:string" />
<xs:element name="ElementType" type="xs:string" />
<xs:element name="PmVersion" type="xs:string" />
<xs:element name="StartTime" type="xs:dateTime" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Measurements" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="ObjectType" type="xs:string" />
<xs:element name="PmName">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="N">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="i" type="xs:integer" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PmData">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="Object">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="V">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="i" type="xs:integer" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="CV">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="SN" type="xs:string" />
<xs:element name="SV" type="xs:string" />
</xs:sequence>
<xs:attribute name="i" type="xs:integer"
use="required" />
</xs:complexType>
</xs:element>
</xs:choice>
<xs:attribute name="rmUID" type="xs:string" use="required" />
<xs:attribute name="Dn" type="xs:string" use="required" />
<xs:attribute name="UserLabel" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@@ -1,5 +1,5 @@
Package: OMC
Version: 2.2410.2-YYYYMMDD
Version: 2.2503.6-YYYYMMDD
Section: AGrandTech
Prioritt: optional
Architecture: amd64

View File

@@ -4,38 +4,25 @@ OMCRootDir=/usr/local/omc
SystemdRootDir=/lib/systemd/system
OMCEtcDir=${OMCRootDir}/etc
FERootDir=${OMCRootDir}/htdocs/front
X86Lib64Dir=/lib/x86_64-linux-gnu
OMCBinDir=${OMCRootDir}/bin
OmcBinDir=${OMCRootDir}/bin
OMCStaticDir=${OMCRootDir}/static
UsrLocalBinDir=/usr/local/bin
OMCDaemon=omcd
OmcDaemon=omcd
NginxEtcDir=/etc/nginx
NginxConfDir=${NginxEtcDir}/conf.d
CFileList="restconf.yaml crontask.yaml tasks.yaml sshsvc.yaml capconf.yaml omc.conf"
CFileList="restconf.yaml sshsvc.yaml omc.conf"
LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png"
echo ""
echo "* To start/stop/restart/status omc service, please run:"
echo " sudo systemctl start/stop/restart/status restagent.service"
echo " sudo systemctl start/stop/restart/status crontask.service"
echo " sudo systemctl start/stop/restart/status sshsvc.service"
echo " sudo systemctl start/stop/restart/status captrace.service"
echo " or run: "
echo " sudo /usr/local/omc/bin/omcsvc.sh start/stop/restart/status"
echo ""
cd ${X86Lib64Dir}
chmod +rx libwireshark.so.15.0.12
if [ ! -e libwireshark.so.15 ]; then ln -s libwireshark.so.15.0.12 libwireshark.so.15; fi
if [ ! -e libwireshark.so ]; then ln -s libwireshark.so.15.0.12 libwireshark.so; fi
chmod +rx libwiretap.so.12.0.12
if [ ! -e libwiretap.so.12 ]; then ln -s libwiretap.so.12.0.12 libwiretap.so.12; fi
if [ ! -e libwiretap.so ]; then ln -s libwiretap.so.12.0.12 libwiretap.so; fi
chmod +rx libwsutil.so.13.1.0
if [ ! -e libwsutil.so.13 ]; then ln -s libwsutil.so.13.1.0 libwsutil.so.13; fi
if [ ! -e libwsutil.so ]; then ln -s libwsutil.so.13.1.0 libwsutil.so; fi
cd ${UsrLocalBinDir}
if [ ! -e ${OMCDaemon} ]; then ln -s ${OMCBinDir}/omcsvc.sh ${OMCDaemon}; fi
if [ ! -e ${OmcDaemon} ]; then ln -s ${OmcBinDir}/omcsvc.sh ${OmcDaemon}; fi
chmod +rx ${OMCRootDir}/bin/*
chmod +rx ${OMCRootDir}/*
@@ -82,9 +69,7 @@ systemctl daemon-reload
systemctl disable --now unattended-upgrades
systemctl enable restagent.service
systemctl enable crontask.service
systemctl enable sshsvc.service
systemctl enable captrace.service
systemctl daemon-reload
@@ -105,8 +90,6 @@ if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
fi
echo -n "Starting OMC service ... "
systemctl start crontask.service
systemctl start sshsvc.service
systemctl start captrace.service
systemctl start restagent.service
echo "done"

View File

@@ -1,13 +1,5 @@
# !/bin/bash
X86Lib64Dir=/lib/x86_64-linux-gnu
rm -rf ${X86Lib64Dir}/libwireshark.so.15
rm -rf ${X86Lib64Dir}/libwireshark.so
rm -rf ${X86Lib64Dir}/libwiretap.so.12
rm -rf ${X86Lib64Dir}/libwiretap.so
rm -rf ${X86Lib64Dir}/libwsutil.so.13
rm -rf ${X86Lib64Dir}/libwsutil.so
#rm -rf /usr/local/omc
rm -rf /etc/nginx/conf.d/omc.conf
rm -f /usr/local/bin/omcd
@@ -17,15 +9,11 @@ systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
fi
systemctl disable restagent.service
systemctl disable crontask.service
systemctl disable sshsvc.service
systemctl disable captrace.service
systemctl daemon-reload

View File

@@ -4,9 +4,7 @@ systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
fi

View File

@@ -44,7 +44,8 @@ database:
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: tenants_db
name: omc_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
backup: /usr/local/omc/database
# Redis data cache

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More