-
Notifications
You must be signed in to change notification settings - Fork 482
Include macro filtering for hosts #1921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 6 commits
058d6f5
2403376
7aa14d4
9875db2
0b57c66
4fb5863
9040c5d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these files show as modifed when they were not i added a space to see the contents |
ozarrouki marked this conversation as resolved.
Show resolved
Hide resolved
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these files show as modifed when they were not i added a space to see the contents |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #!/bin/bash | ||
| #!/bin/bash | ||
|
|
||
| # Run redis server first | ||
| # cd /zas/redis-3.2.9/src/ | ||
|
|
||
ozarrouki marked this conversation as resolved.
Show resolved
Hide resolved
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these files show as modifed when they were not i added a space to see the contents |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -148,6 +148,15 @@ export class ZabbixAPIConnector { | |
| return this.request('hostgroup.get', params); | ||
| } | ||
|
|
||
| getUserMacrosByGroup(groupids) { | ||
| const params = { | ||
| output: ['hostmacroid', 'macro', 'value', 'hostid'], | ||
| groupids: groupids, | ||
| }; | ||
|
|
||
| return this.request('usermacro.get', params); | ||
| } | ||
|
|
||
| getHosts(groupids): Promise<any[]> { | ||
| const params: any = { | ||
| output: ['hostid', 'name', 'host'], | ||
|
|
@@ -245,6 +254,15 @@ export class ZabbixAPIConnector { | |
| return this.request('usermacro.get', params); | ||
| } | ||
|
|
||
| getMacrosByGroup(groupids) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand the need for 2 different functions. The other one only misses 3 fields.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also why don't you use the getMacros function above and extend that with the groupids? |
||
| const params = { | ||
| output: 'extend', | ||
| groupids: groupids, | ||
| }; | ||
|
|
||
| return this.request('usermacro.get', params); | ||
| } | ||
|
|
||
| getUserMacros(hostmacroids) { | ||
| const params = { | ||
| output: 'extend', | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.