Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zabbix
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
certo
zabbix
Commits
73996b30
Commit
73996b30
authored
May 07, 2019
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added CacheSize CWMP configuration option
parent
781fba50
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
Makefile
Makefile
+1
-0
zabbix_server
zabbix_server
+15
-0
zabbix_server-configure
zabbix_server-configure
+4
-0
No files found.
Makefile
View file @
73996b30
...
...
@@ -122,6 +122,7 @@ config zabbix 'server'
option
hostname
''
option
name
''
option
startpollers
'5'
option
cachesize
'32M'
endef
export
ZABBIX_SERVER_CONFIG
...
...
zabbix_server
View file @
73996b30
...
...
@@ -21,6 +21,7 @@ entry_execute_method_root_Zabbix() {
common_execute_method_param
"
$DMROOT
.Zabbix.Server.Server"
"1"
"zabbix_get_server_server"
"zabbix_set_server_server"
common_execute_method_param
"
$DMROOT
.Zabbix.Server.Name"
"1"
"zabbix_get_server_name"
"zabbix_set_server_name"
common_execute_method_param
"
$DMROOT
.Zabbix.Server.StartPollers"
"1"
"zabbix_get_start_pollers"
"zabbix_set_start_pollers"
common_execute_method_param
"
$DMROOT
.Zabbix.Server.CacheSize"
"1"
"zabbix_get_cache_size"
"zabbix_set_cache_size"
return
0
;
;;
esac
...
...
@@ -82,3 +83,17 @@ zabbix_set_start_pollers() {
chmod
a+r /etc/config/zabbix
fi
}
zabbix_get_cache_size
()
{
echo
`
$UCI_GET
zabbix.server.cachesize
`
}
zabbix_set_cache_size
()
{
local
cachesize
=
`
$UCI_GET
zabbix.server.cachesize
`
if
[
"
$cachesize
"
!=
"
$1
"
]
;
then
$UCI_SET
zabbix.server.cachesize
=
"
$1
"
$UCI_COMMIT
chmod
a+r /etc/config/zabbix
fi
}
zabbix_server-configure
View file @
73996b30
...
...
@@ -5,6 +5,7 @@ DATABASE=`/sbin/uci -q get mysql.credentials.database`
USER
=
`
/sbin/uci
-q
get mysql.credentials.username
`
PASSWORD
=
`
/sbin/uci
-q
get mysql.credentials.password
`
START_POLLERS
=
`
/sbin/uci
-q
get zabbix.server.startpollers
`
CACHE_SIZE
=
`
/sbin/uci
-q
get zabbix.server.cachesize
`
if
[
!
-z
"
$SERVER
"
]
&&
[
!
-z
"
$DATABASE
"
]
&&
[
!
-z
"
$USER
"
]
&&
[
!
-z
"
$PASSWORD
"
]
;
then
echo
"DBHost=
$SERVER
"
>
/etc/zabbix_server.conf.d/zabbix_server.conf
...
...
@@ -14,6 +15,9 @@ if [ ! -z "$SERVER" ] && [ ! -z "$DATABASE" ] && [ ! -z "$USER" ] && [ ! -z "$PA
if
[
!
-z
"
$START_POLLERS
"
]
;
then
echo
"StartPollers=
$START_POLLERS
"
>>
/etc/zabbix_server.conf.d/zabbix_server.conf
fi
if
[
!
-z
"
$CACHE_SIZE
"
]
;
then
echo
"CacheSize=
$CACHE_SIZE
"
>>
/etc/zabbix_server.conf.d/zabbix_server.conf
fi
else
exit
1
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment