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
a1145919
Commit
a1145919
authored
Nov 20, 2019
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed zabbix proxy configuration
parent
ceab6c42
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
19 deletions
+8
-19
Makefile
Makefile
+3
-2
zabbix_proxy
zabbix_proxy
+0
-14
zabbix_proxy-configure
zabbix_proxy-configure
+5
-3
No files found.
Makefile
View file @
a1145919
...
...
@@ -145,6 +145,8 @@ proxy: zabbix-proxy-service zabbix-proxy-config
$(MAKE)
-C
zabbix-3.4.14
$(MAKE)
-C
zabbix-3.4.14
install
install
-v
-Dm755
zabbix_proxy-configure /usr/sbin/zabbix_proxy-configure
sed
-e
's|^Server=.*|# Server=|'
-i
/etc/zabbix_proxy.conf
sed
-e
's|^Hostname=.*|# Hostname=|'
-i
/etc/zabbix_proxy.conf
sed
-e
's|.*LogType=.*|LogType=system|'
-i
/etc/zabbix_proxy.conf
sed
-e
's|^LogFile=.*|# LogFile=|'
-i
/etc/zabbix_proxy.conf
sed
-e
's|.*PidFile=.*|PidFile=/run/zabbix/zabbix_proxy.pid|'
-i
/etc/zabbix_proxy.conf
...
...
@@ -184,8 +186,7 @@ zabbix-proxy-config:
define
ZABBIX_PROXY_CONFIG
config
zabbix
'proxy'
option
hostname
''
option
name
''
option
server
''
option
startpollers
'5'
option
cachesize
'32M'
endef
...
...
zabbix_proxy
View file @
a1145919
...
...
@@ -19,7 +19,6 @@ entry_execute_method_root_Zabbix() {
common_execute_method_param
"
$DMROOT
.Zabbix.Agent.Server"
"1"
"zabbix_get_agent_server"
"zabbix_set_agent_server"
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.Name"
"1"
"zabbix_get_proxy_name"
"zabbix_set_proxy_name"
common_execute_method_param
"
$DMROOT
.Zabbix.Proxy.StartPollers"
"1"
"zabbix_get_start_pollers"
"zabbix_set_start_pollers"
common_execute_method_param
"
$DMROOT
.Zabbix.Proxy.CacheSize"
"1"
"zabbix_get_cache_size"
"zabbix_set_cache_size"
return
0
;
...
...
@@ -58,19 +57,6 @@ zabbix_set_proxy_server() {
fi
}
zabbix_get_proxy_name
()
{
echo
`
$UCI_GET
zabbix.proxy.name
`
}
zabbix_set_proxy_name
()
{
local
name
=
`
$UCI_GET
zabbix.proxy.name
`
if
[
"
$name
"
!=
"
$1
"
]
;
then
$UCI_SET
zabbix.proxy.name
=
"
$1
"
$UCI_COMMIT
chmod
a+r /etc/config/zabbix
fi
}
zabbix_get_start_pollers
()
{
echo
`
$UCI_GET
zabbix.proxy.startpollers
`
}
...
...
zabbix_proxy-configure
View file @
a1145919
#!/bin/sh
SERVER
=
`
/sbin/uci
-q
get mysql.credentials.hostname
`
DB
SERVER
=
`
/sbin/uci
-q
get mysql.credentials.hostname
`
DATABASE
=
`
/sbin/uci
-q
get mysql.credentials.database
`
USER
=
`
/sbin/uci
-q
get mysql.credentials.username
`
PASSWORD
=
`
/sbin/uci
-q
get mysql.credentials.password
`
SERVER
=
`
/sbin/uci
-q
get zabbix.proxy.server
`
START_POLLERS
=
`
/sbin/uci
-q
get zabbix.proxy.startpollers
`
CACHE_SIZE
=
`
/sbin/uci
-q
get zabbix.proxy.cachesize
`
if
[
!
-z
"
$
SERVER
"
]
&&
[
!
-z
"
$DATABASE
"
]
&&
[
!
-z
"
$USER
"
]
&&
[
!
-z
"
$PASSWORD
"
]
;
then
echo
"DBHost=
$SERVER
"
>
/etc/zabbix_proxy.conf.d/zabbix_proxy.conf
if
[
!
-z
"
$
DBSERVER
"
]
&&
[
!
-z
"
$DATABASE
"
]
&&
[
!
-z
"
$USER
"
]
&&
[
!
-z
"
$PASSWORD
"
]
&&
[
!
-z
"
$SERVER
"
]
;
then
echo
"DBHost=
$
DB
SERVER
"
>
/etc/zabbix_proxy.conf.d/zabbix_proxy.conf
echo
"DBName=
$DATABASE
"
>>
/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
"Server=
$SERVER
"
>
/etc/zabbix_proxy.conf.d/zabbix_proxy.conf
if
[
!
-z
"
$START_POLLERS
"
]
;
then
echo
"StartPollers=
$START_POLLERS
"
>>
/etc/zabbix_proxy.conf.d/zabbix_proxy.conf
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