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

Journal / Log for Devices (or maybe other Models as well) #151

Closed
peelman opened this issue Jun 30, 2016 · 18 comments
Closed

Journal / Log for Devices (or maybe other Models as well) #151

peelman opened this issue Jun 30, 2016 · 18 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@peelman
Copy link
Contributor

peelman commented Jun 30, 2016

#122 made me think of a situation I ran into when working on an Asset Management system that never got the green light to go open source at a previous gig.

It was requested (and eventually halfway implemented) that I add a Log/Journal/Comments section to each [Item]. This allowed for Human-stamped and Time-Stamped entries to denote maintenance, firmware/software updates, part replacements, or other changes, without having to edit a notes field continuously with something like:

6/30/2016 NP Updated Firmware to version R15.3

The intention was to ease use, enforce consistency (at least in where to make the comment), and safeguard any existing note data that might get wiped out by a select-all-start-typing-without-noticing mishap. The roadmap was to enable those log/journal/comment entires to be created by users of varying roles, whereas somebody might not have permissions to edit the object itself, but could add a note saying what they did to it.

@ryanmerolle
Copy link
Contributor

That would be interesting! Depending on your workflow, it would be very useful escpcially via the API. Given the change workflows I have seen, I could see the following use case dealing with changes pushed or scheduled:

  • change management tool posting links to changes for more info.
  • automation workflow posting a Config description / commit message with timestamp to a netbox device record once a change is complete
  • Ops teams creating scripts or manually updating said journal to link to outside tickets like TAC that may not be linked to an internal change ticket yet or ever.

@eronlloyd
Copy link

We are using another IPAM for the space serving our subscribers, and it does a great job actually logging the history of IP assignments, which I can see being helpful to troubleshoot if/when the network gets changed around. I would definitely support this, and would like to even get involved with contributing to netbox.

@puck
Copy link

puck commented Aug 2, 2017

Hmmm, something to consider is a journal brings Netbox closer to Asset Management. My plan is to use the Asset module in Request Tracker for the asset side of things, and have Netbox link to RT.

@a31amit
Copy link

a31amit commented Aug 8, 2018

+1 This feature would be extremely useful track changes on assets some one made.

@mikili
Copy link

mikili commented Aug 14, 2018

will this feature be added in the next update of netbox tools? our company is very interested in using netbox and this feature is very important for us.
thanks in advance

@bdlamprecht
Copy link
Contributor

Perhaps FR #2511 would solve this type of request without getting too far into the asset management realm.

@a31amit
Copy link

a31amit commented Dec 5, 2018

#2511 would be only useful when someone wanted to do an audit of existing objects but not helpful for the direct users of Web UI whose just wanted to learn information associated with particular objects.

this would really help when someone wanted to track ChangeRequestsID or add services history for sites/Racks/Devices.
I believe something like free fall multiple comments similar to many social media or Atlassian confluence documents allow would be useful here.

I believe django.contrib.comments module can be used here.

@jeremystretch Can you please review it and add some timeline for it? It would be really useful when someone can add multiple comments or text log to objects.

@jeremystretch
Copy link
Member

@a31amit I review all issues, but I don't provide timelines for any features.

@apollo13
Copy link

apollo13 commented Jan 7, 2019

@jeremystretch We'd like to see something like this in netbox too and might be able to offer the code for it. Could you outline if this is:

  • Something you'd accept at all
  • A rough overview of what you'd expect

@brammeleman
Copy link

Mmm it doesn't look like haminhcong's service-user-panel implements the request discussed here.

@DanSheps
Copy link
Member

No, it looks like they are modifying netbox for openstack.

@rainerduffner
Copy link

I know that Netbox is primarily an IPAM - but it would be so nice to replace our in-house inventory-management app with this. Except Netbox is missing this one feature that is absolutely critical.

I would be curious to know how others tackle this?

@jeremystretch jeremystretch added type: feature Introduction of new functionality to the application needs milestone Awaiting prioritization for inclusion with a future NetBox release and removed type: major feature status: accepted This issue has been accepted for implementation labels Jul 24, 2020
@raddessi
Copy link

raddessi commented Aug 28, 2020

@rainerduffner we have a <!-- start managed --><!-- end managed --> block in the Comments field for each of our devices. This block is maintained by an external script that updates links to support issues/monitoring links/other items where that device was mentioned for each device that we have, and the area outside that block can be edited by users still like the Comments field was initially meant for.

Having a dedicated section that would have some sort of distinct entry system would be fantastic for us, we would move the contents of the managed section out to a entry that we could in theory keep updated and users would not have to work around our big blob of text when they try to enter notes.

There are some cases we have created custom fields for that this may help with.. for example we have a previous_device_fqdns custom field. It would be a great help if the notes would be parseable or filterable in some way.. but it would probably be easier than trying to parse all of the Comments area which we abandoned in favor of using a custom field for that item.

EDIT: Of course with the new plugins system we could easily split this out on our own, which we may just do in the future.

@jeremystretch
Copy link
Member

This is one of our oldest open issues. While I agree that it would be very well-suited as a plugin, it's also a very common use case and worthy of inclusion in core. I'm envisioning a single new model, named JournalEntry. (I'm using the term "journal" here to imply a record created by a human, as opposed to "log" which in our industry tends to imply machine generation.)

class JournalEntry(models.Model):
    content_type = models.ForeignKey(
        to=ContentType,
        on_delete=models.CASCADE
    )
    object_id = models.PositiveIntegerField()
    parent = GenericForeignKey(
        ct_field='content_type',
        fk_field='object_id'
    )
    created = models.DateTimeField(
        auto_now_add=True,
        editable=False
    )
    created_by = models.ForeignKey(
        to=User,
        on_delete=models.SET_NULL,
        related_name='changes',
        blank=True,
        null=True
    )
    content = models.TextField()

We could embed a form directly on each object's primary view to allow the addition of new entries without modifying the object itself. The creation time and associated user would be set automatically. Content would support markdown rendering just as comments do today. A new REST API under /api/extras/ would be added as well.

I want to point out that this introduces two distinct streams of history: We have changes to the NetBox object, recorded in the change log, and now we'll have a journal for separate "real world" changes. The journal might include an entry like "Reassigning IPs using space from provider X", whereas the changelog would show the actual changes being made in NetBox. I think this is tremendously convenient, so long as its clear to users the function of each feature.

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed needs milestone Awaiting prioritization for inclusion with a future NetBox release labels Dec 21, 2020
@jeremystretch jeremystretch self-assigned this Dec 21, 2020
@jeremystretch jeremystretch added this to the v2.11 milestone Dec 21, 2020
@ktims
Copy link

ktims commented Dec 21, 2020

@jeremystretch I really like the sound of this model. It would be especially useful if the Journal Entry could (optionally) link to the ChangeLog, perhaps providing a 'reason' field or similar in the edit dialog?

@xkilian
Copy link

xkilian commented Dec 22, 2020

If desired, I would see what ktims suggests as more of a UI function. When displaying journal entries, there could be a method(some type of quick toggle) to display "change log" entries related to the current journal filter. And not polluting the journal with links back to the change log.

@a31amit
Copy link

a31amit commented Jan 7, 2021

Can this also be include or be a part of bulk changes as well. so that more than 1 device can be updated with the journal log entry.

@jeremystretch jeremystretch removed their assignment Feb 15, 2021
@darcynz
Copy link

darcynz commented Mar 15, 2021

This could be super handy for Rack management as well. Eg a use case for us is recording an entry in the journal when ever permission has been given to a user to access the rack.

@jeremystretch jeremystretch self-assigned this Mar 16, 2021
jeremystretch added a commit that referenced this issue Mar 17, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests