Ad Widget

Collapse

Source Code Documentation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #1

    Source Code Documentation

    I thought of putting this in a 1.6 suggestion, but I feel it should start now. I've been reading through the source code for a few days now trying to unravel what's going on with graph creation. I'm getting close, but it would be really really really really helpful if each file/module had a quick blurb about what the purpose of the file/module is. For instance if there was a comment at the top for the screens.php file saying something to the effect of "This file generates the screen page. It takes x y and z variables from post and will display the page appropriately. All major page generation is done during the function bla."

    I know this would help myself and many others get up to speed faster in understanding the code. Plus for complicated bits it would help others to debug logic errors. I'm not saying every line needs to be documented or to document to the level my CS teachers wanted, but a quick blurb at the top of each file to clue me and others in as to what's going on.
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

  • just2blue4u
    Senior Member
    • Apr 2006
    • 347

    #2
    i agree!

    Yes, i know you developers do a good thing and surely don't like wasting your time.
    But as said: This is really a tiny amount of time invested in comparison to the benefit...

    PS: i just signed up in the support corner anmust say it's really looking nice on firest view! Thx guys!
    Big ZABBIX is watching you!
    (... and my 48 hosts, 4513 items, 1280 triggers via zabbix v1.6 on CentOS 5.0)

    Comment

    • nelsonab
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2006
      • 1233

      #3
      I didn't mean to sound "grumpy" but I was a little frustrated at the time.

      After having learned the code a fair bit more I am quite impressed with how some things are done. I feel that not much is required in terms of additional documentation. A short 1-3 line comment at the start of a function talking about what it's supposed to do would be fantastic! I'm currently trying to understand check_fields($fields) and it's a little "cryptic" to understand at times, this is a good function for some comments. If I manage to figure it out well enough perhaps I'll submit back a comments patch. :-)

      Overall I am quite impressed with the power and flexibility of Zabbix. The way data graphing works is what had me sold. True RRD may be able to produce a "prettier" graph for some bits of data, but it does not have the ability to drill down and look at data in the past. I love that about Zabbix!
      RHCE, author of zbxapi
      Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
      Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

      Comment

      Working...