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
ecedf204
Commit
ecedf204
authored
May 13, 2025
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support of proxy hostname
parent
a19cbb3f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
Makefile
Makefile
+1
-0
zabbix_proxy
zabbix_proxy
+14
-0
zabbix_proxy-configure
zabbix_proxy-configure
+4
-0
No files found.
Makefile
View file @
ecedf204
...
@@ -286,6 +286,7 @@ define ZABBIX_PROXY_CONFIG
...
@@ -286,6 +286,7 @@ define ZABBIX_PROXY_CONFIG
config
zabbix
'proxy'
config
zabbix
'proxy'
option
server
''
option
server
''
option
hostname
''
option
startpollers
'5'
option
startpollers
'5'
option
cachesize
'32M'
option
cachesize
'32M'
endef
endef
...
...
zabbix_proxy
View file @
ecedf204
...
@@ -20,6 +20,7 @@ entry_execute_method_root_Zabbix() {
...
@@ -20,6 +20,7 @@ entry_execute_method_root_Zabbix() {
common_execute_method_param
"
$DMROOT
.Zabbix.Agent.ServerActive"
"1"
"zabbix_get_agent_serveractive"
"zabbix_set_agent_serveractive"
common_execute_method_param
"
$DMROOT
.Zabbix.Agent.ServerActive"
"1"
"zabbix_get_agent_serveractive"
"zabbix_set_agent_serveractive"
common_execute_method_obj
"
$DMROOT
.Zabbix.Proxy."
"0"
common_execute_method_obj
"
$DMROOT
.Zabbix.Proxy."
"0"
common_execute_method_param
"
$DMROOT
.Zabbix.Proxy.Server"
"1"
"zabbix_get_proxy_server"
"zabbix_set_proxy_server"
common_execute_method_param
"
$DMROOT
.Zabbix.Proxy.Server"
"1"
"zabbix_get_proxy_server"
"zabbix_set_proxy_server"
common_execute_method_param
"
$DMROOT
.Zabbix.Proxy.Hostname"
"1"
"zabbix_get_proxy_hostname"
"zabbix_set_proxy_hostname"
common_execute_method_param
"
$DMROOT
.Zabbix.Proxy.StartPollers"
"1"
"zabbix_get_start_pollers"
"zabbix_set_start_pollers"
common_execute_method_param
"
$DMROOT
.Zabbix.Proxy.StartPollers"
"1"
"zabbix_get_start_pollers"
"zabbix_set_start_pollers"
common_execute_method_param
"
$DMROOT
.Zabbix.Proxy.StartPingers"
"1"
"zabbix_get_start_pingers"
"zabbix_set_start_pingers"
common_execute_method_param
"
$DMROOT
.Zabbix.Proxy.StartPingers"
"1"
"zabbix_get_start_pingers"
"zabbix_set_start_pingers"
common_execute_method_param
"
$DMROOT
.Zabbix.Proxy.CacheSize"
"1"
"zabbix_get_cache_size"
"zabbix_set_cache_size"
common_execute_method_param
"
$DMROOT
.Zabbix.Proxy.CacheSize"
"1"
"zabbix_get_cache_size"
"zabbix_set_cache_size"
...
@@ -72,6 +73,19 @@ zabbix_set_proxy_server() {
...
@@ -72,6 +73,19 @@ zabbix_set_proxy_server() {
fi
fi
}
}
zabbix_get_proxy_hostname
()
{
echo
`
$UCI_GET
zabbix.proxy.hostname
`
}
zabbix_set_proxy_hostname
()
{
local hostname
=
`
$UCI_GET
zabbix.proxy.hostname
`
if
[
"
$hostname
"
!=
"
$1
"
]
;
then
$UCI_SET
zabbix.proxy.hostname
=
"
$1
"
$UCI_COMMIT
chmod
a+r /etc/config/zabbix
fi
}
zabbix_get_start_pollers
()
{
zabbix_get_start_pollers
()
{
echo
`
$UCI_GET
zabbix.proxy.startpollers
`
echo
`
$UCI_GET
zabbix.proxy.startpollers
`
}
}
...
...
zabbix_proxy-configure
View file @
ecedf204
...
@@ -5,6 +5,7 @@ DATABASE=`/sbin/uci -q get mysql.credentials.database`
...
@@ -5,6 +5,7 @@ DATABASE=`/sbin/uci -q get mysql.credentials.database`
USER
=
`
/sbin/uci
-q
get mysql.credentials.username
`
USER
=
`
/sbin/uci
-q
get mysql.credentials.username
`
PASSWORD
=
`
/sbin/uci
-q
get mysql.credentials.password
`
PASSWORD
=
`
/sbin/uci
-q
get mysql.credentials.password
`
SERVER
=
`
/sbin/uci
-q
get zabbix.proxy.server
`
SERVER
=
`
/sbin/uci
-q
get zabbix.proxy.server
`
HOSTNAME
=
`
/sbin/uci
-q
get zabbix.proxy.hostname
`
START_POLLERS
=
`
/sbin/uci
-q
get zabbix.proxy.startpollers
`
START_POLLERS
=
`
/sbin/uci
-q
get zabbix.proxy.startpollers
`
START_PINGERS
=
`
/sbin/uci
-q
get zabbix.proxy.startpingers
`
START_PINGERS
=
`
/sbin/uci
-q
get zabbix.proxy.startpingers
`
CACHE_SIZE
=
`
/sbin/uci
-q
get zabbix.proxy.cachesize
`
CACHE_SIZE
=
`
/sbin/uci
-q
get zabbix.proxy.cachesize
`
...
@@ -15,6 +16,9 @@ if [ ! -z "$DBSERVER" ] && [ ! -z "$DATABASE" ] && [ ! -z "$USER" ] && [ ! -z "$
...
@@ -15,6 +16,9 @@ if [ ! -z "$DBSERVER" ] && [ ! -z "$DATABASE" ] && [ ! -z "$USER" ] && [ ! -z "$
echo
"DBUser=
$USER
"
>>
/etc/zabbix_proxy.conf.d/zabbix_proxy.conf
echo
"DBUser=
$USER
"
>>
/etc/zabbix_proxy.conf.d/zabbix_proxy.conf
echo
"DBPassword=
$PASSWORD
"
>>
/etc/zabbix_proxy.conf.d/zabbix_proxy.conf
echo
"DBPassword=
$PASSWORD
"
>>
/etc/zabbix_proxy.conf.d/zabbix_proxy.conf
echo
"Server=
$SERVER
"
>>
/etc/zabbix_proxy.conf.d/zabbix_proxy.conf
echo
"Server=
$SERVER
"
>>
/etc/zabbix_proxy.conf.d/zabbix_proxy.conf
if
[
!
-z
"
$HOSTNAME
"
]
;
then
echo
"Hostname=
$HOSTNAME
"
>>
/etc/zabbix_proxy.conf.d/zabbix_proxy.conf
fi
if
[
!
-z
"
$START_POLLERS
"
]
;
then
if
[
!
-z
"
$START_POLLERS
"
]
;
then
echo
"StartPollers=
$START_POLLERS
"
>>
/etc/zabbix_proxy.conf.d/zabbix_proxy.conf
echo
"StartPollers=
$START_POLLERS
"
>>
/etc/zabbix_proxy.conf.d/zabbix_proxy.conf
fi
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