Skip to content
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

Zabbix 2.4 Template Schema Support #3

Open
akayueh opened this issue Aug 18, 2016 · 12 comments
Open

Zabbix 2.4 Template Schema Support #3

akayueh opened this issue Aug 18, 2016 · 12 comments

Comments

@akayueh
Copy link

akayueh commented Aug 18, 2016

Hi Ryan

I have uploaded a version of your mib2zabbix to support v.24 template schema, feel free to merge it to your master copy. It is not the cleanest but it does the job.

https://github.com/akayueh/mib2zabbix

Steven

@akayueh
Copy link
Author

akayueh commented Aug 18, 2016

Will need to work on the OID for the LLD items, will let you know when I fixed this issue.

@cavaliercoder
Copy link
Collaborator

Thanks very much for submitting this. I'm happy to include your changes if you can please raise a Pull request. I will ask that you please only submit the changes that are relevant to this feature. I.e. undo any changes to code formatting/indentation for unrelated code and remove any of the XML::Simple 2.20 fix stuff. These things should be addressed in discrete pull requests.

@akayueh
Copy link
Author

akayueh commented Aug 18, 2016

Let me work on my fork with the OID for 2.4 first, the I will do a pull
request. Want to keep as clean as possible.

Regards

Steven

On Thursday, 18 August 2016, Ryan Armstrong [email protected]
wrote:

Thanks very much for submitting this. I'm happy to include your changes if
you can please raise a Pull request. I will ask that you please only submit
the changes that are relevant to this feature. I.e. undo any changes to
code formatting/indentation for unrelated code and remove any of the
XML::Simple 2.20 fix stuff. These things should be addressed in discrete
pull requests.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADzGCQMNdUleYVi3wka26wiZ6su6CCS-ks5qhBQfgaJpZM4JnKIy
.

Steven Yu

"And you will know the truth, and the truth will set you free", John 8:32
"你們必定認識真理,真理必定使你們自由", 約翰福音 8:32

@akayueh
Copy link
Author

akayueh commented Aug 19, 2016

Hi Ryan

I think the LLD algorithm is wrong with the script, and I don't know whether it will work in v3 of Zabbix with the new macro support either. (based on the v2 export option, my template doesn't seem to carry any of the LLD related macros)

I will use the following OID from Doremi MIB as an example.

dcpSENfansTable .1.3.6.1.4.1.24391.4.1.3.3.1.1
-dcpSENfansEntry .1.3.6.1.4.1.24391.4.1.3.3.1.1.1
--dcpFANIndex .1.3.6.1.4.1.24391.4.1.3.3.1.1.1.1
--dcpFANTitle .1.3.6.1.4.1.24391.4.1.3.3.1.1.1.2
--dcpFANWorkingState .1.3.6.1.4.1.24391.4.1.3.3.1.1.1.3
--dcpFANValue .1.3.6.1.4.1.24391.4.1.3.3.1.1.1.4
--dcpFANLowThreshold .1.3.6.1.4.1.24391.4.1.3.3.1.1.1.5
--dcpFANHighThreshold .1.3.6.1.4.1.24391.4.1.3.3.1.1.1.6

Current version of the script generated the following layers in the LLD:

- dcpSENfansEntry discovery[{#DCPFANHIGHTHRESHOLD},.1.3.6.1.4.1.24391.4.1.3.3.1.1.1.6,{#DCPFANLOWTHRESHOLD},.1.3.6.1.4.1.24391.4.1.3.3.1.1.1.5,{#DCPFANVALUE},.1.3.6.1.4.1.24391.4.1.3.3.1.1.1.4,{#DCPFANWORKINGSTATE},.1.3.6.1.4.1.24391.4.1.3.3.1.1.1.3]
-- dcpFANHighThreshold for {#SNMPINDEX}
-- dcpFANIndex for {#SNMPINDEX}
-- dcpFANLowThreshold for {#SNMPINDEX}
-- dcpFANTitle for {#SNMPINDEX}
-- dcpFANValue for {#SNMPINDEX}
-- dcpFANWorkingState for {#SNMPINDEX}

But in order for the LLD to work, the layout should be:

- dcpSENfansTable discovery (.1.3.6.1.4.1.24391.4.1.3.3.1.1.1.1) <-- OID of dcpFANIndex
-- dcpFANHighThreshold for {#SNMPINDEX} (dcpFANIndex)
-- dcpFANLowThreshold for {#SNMPINDEX} (dcpFANIndex)
-- dcpFANTitle for {#SNMPINDEX} (dcpFANIndex)
-- dcpFANValue for {#SNMPINDEX} (dcpFANIndex)
-- dcpFANWorkingState for {#SNMPINDEX} (dcpFANIndex)

Happy to discuss

Steven

@cavaliercoder
Copy link
Collaborator

Thanks Steven. The key format for SNMP discoveries have changed in v3: https://www.zabbix.com/documentation/3.0/manual/discovery/low_level_discovery#discovery_of_snmp_oids

Admittedly this will break v2, but I deliberately discontinued v2 support given the lack of interest. Maybe this was a bad decision.

@akayueh
Copy link
Author

akayueh commented Aug 19, 2016

no worries, I will see what I can do.

On 19 August 2016 at 15:12, Ryan Armstrong [email protected] wrote:

Thanks Steven. The key format for SNMP discoveries have changed in v3:
https://www.zabbix.com/documentation/3.0/manual/
discovery/low_level_discovery#discovery_of_snmp_oids

Admittedly this will break v2, but I deliberately discontinued v2 support
given the lack of interest. Maybe this was a bad decision.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADzGCXI54RtumS-3d_cxIqUqvFMYBFWYks5qhTtGgaJpZM4JnKIy
.

Steven Yu

"And you will know the truth, and the truth will set you free", John 8:32
"你們必定認識真理,真理必定使你們自由", 約翰福音 8:32

@akayueh
Copy link
Author

akayueh commented Aug 24, 2016

HI Ryan

I have submit a pull request for the changes I made, please review.

Thanks for your inital work,, it will save me heaps of time in creating various templates for different devices in my moniotoring work.

Regards

Steven

@akayueh
Copy link
Author

akayueh commented Oct 6, 2016

Hi Ryan

Did you have a chance to review the changes I made for the 2.4 pull?

Regards

Steven

@cavaliercoder
Copy link
Collaborator

Yes, briefly. Apologies for the delay. I have been travelling to Zabbix Conference and moving house once I returned. I only having fleeting access to the Internet!

I'm happy to accept your PR but noticed there are still a few 'stylistic' and formatting changes to please undo. I've added comments to #5.

@akayueh
Copy link
Author

akayueh commented Oct 17, 2016

Sorry, I am not sure about the request is it adding a new line where you indicated or you have removed the line already.

As I can't find the extra new line, I have add them in.

@cavaliercoder
Copy link
Collaborator

Okay no problem. I'll patch it up shortly and accept. Etiquette on GitHub is to keep pull requests as specific and discrete as possible, so please be careful not to bundle in changes like this in future. Thanks heaps for your contribution!

@akayueh
Copy link
Author

akayueh commented Oct 17, 2016

Thanks, looking forward to watch your presentation on this year's Zabbix
conference when they been uploaded to youtube.

On 17 October 2016 at 16:50, Ryan Armstrong [email protected]
wrote:

Okay no problem. I'll patch it up shortly and accept. Etiquette on GitHub
is to keep pull requests as specific and discrete as possible, so please be
careful not to bundle in changes like this in future. Thanks heaps for your
contribution!


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADzGCf8ZsRjmmm0HSvbMUri87j4-_WJhks5q0wzAgaJpZM4JnKIy
.

Steven Yu

"And you will know the truth, and the truth will set you free", John 8:32
"你們必定認識真理,真理必定使你們自由", 約翰福音 8:32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants