Hi all,
I can't seem to see this feature on the port details page or the 'all ports' list but forgive me if it is visible somewhere.
It would be useful to have a 'last changed' time (30 mins ago) etc... on the port details page.
This info can be gained from SNMP and from what I can see is already in the DB so it would just be a case of adding it to the page code.
Thanks
Jake
Hi,
I’m wanting to add a link to a custom web page onto the Observium menu bar. The navbar.inc.php file has the below:
// Custom navbar entries. if(is_file("includes/navbar-custom.inc.php”))
Presumably if I create this file I’ll be able to add custom links to the menu bar. Does anybody know what format this is supposed to be in? I’ve played around and each time have messed up the entire menu.
TIA
Jake Turner
On 14/04/2014 21:22, Jake Turner wrote:
Hi,
I'm wanting to add a link to a custom web page onto the Observium menu bar. The navbar.inc.php file has the below:
// Custom navbar entries. if(is_file("includes/navbar-custom.inc.php"))
Presumably if I create this file I'll be able to add custom links to the menu bar. Does anybody know what format this is supposed to be in? I've played around and each time have messed up the entire menu.
Hi Jake,
The content of the file is inserted verbatim into the HTML code so you'll need to copy the HTML for an entire dropdown menu plus contents from the site source (either from PHP or just from your browser) and adjust it to your needs...
Tom
Hi Tom,
That confirms what I suspected and have gotten it working now. Thank you very much.
Jake
On 14 Apr 2014, at 21:05, "Tom Laermans" tom.laermans@powersource.cx wrote:
On 14/04/2014 21:22, Jake Turner wrote: Hi,
I’m wanting to add a link to a custom web page onto the Observium menu bar. The navbar.inc.php file has the below:
// Custom navbar entries. if(is_file("includes/navbar-custom.inc.php”))
Presumably if I create this file I’ll be able to add custom links to the menu bar. Does anybody know what format this is supposed to be in? I’ve played around and each time have messed up the entire menu.
Hi Jake,
The content of the file is inserted verbatim into the HTML code so you'll need to copy the HTML for an entire dropdown menu plus contents from the site source (either from PHP or just from your browser) and adjust it to your needs...
Tom _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
Hi
Does anybody know where the ‘ifLastChange’ field in the DB gets set?
I’m trying to add in a script that will pull the last change time using SNMP from Cisco devices (I already know how to do this) and then add this into the db instead of wherever it get’s set by default.
The reason I want to do this is because the alerts at present can be slightly misleading. When I ignore a down interface (say it’s been down a week) and then remove the ignore flag, the interface shows as being down since the time the ignore flag was removed. This could lead to chasing tails trying to figure out why an interface has gone down when in fact it hasn’t been up for a week.
Happy Easter to all too :)
Jake Turner
On 13 Apr 2014, at 06:28, Jake Turner <Jake.Turner@turnerhouse.org.ukmailto:Jake.Turner@turnerhouse.org.uk> wrote:
Hi all,
I can't seem to see this feature on the port details page or the 'all ports' list but forgive me if it is visible somewhere.
It would be useful to have a 'last changed' time (30 mins ago) etc... on the port details page.
This info can be gained from SNMP and from what I can see is already in the DB so it would just be a case of adding it to the page code.
Thanks
Jake _______________________________________________ observium mailing list observium@observium.orgmailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
You can easily ascertain this by looking at the code.
It's actually quite well documented in the code, and is not a reliable value, really.
adam.
On 2014-04-18 19:34, Jake Turner wrote:
Hi
Does anybody know where the ‘ifLastChange’ field in the DB gets set?
I’m trying to add in a script that will pull the last change time using SNMP from Cisco devices (I already know how to do this) and then add this into the db instead of wherever it get’s set by default.
The reason I want to do this is because the alerts at present can be slightly misleading. When I ignore a down interface (say it’s been down a week) and then remove the ignore flag, the interface shows as being down since the time the ignore flag was removed. This could lead to chasing tails trying to figure out why an interface has gone down when in fact it hasn’t been up for a week.
Happy Easter to all too :)
Jake Turner
On 13 Apr 2014, at 06:28, Jake Turner Jake.Turner@turnerhouse.org.uk wrote:
Hi all,
I can't seem to see this feature on the port details page or the 'all ports' list but forgive me if it is visible somewhere.
It would be useful to have a 'last changed' time (30 mins ago) etc... on the port details page.
This info can be gained from SNMP and from what I can see is already in the DB so it would just be a case of adding it to the page code.
Thanks
Jake _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
Hmm, not sure what documentation is in the code, perhaps I was looking at the wrong files.
It would appear however that the ifLastChange field is only changed whenever that particular record gets ‘updated’. The MySQL column has 'on update CURRENT_TIMESTAMP’ as it’s attribute.
I’m thinking of removing that and creating a separate script to update this column with the interface change time as reported by the device.
Thanks
Jake Turner
Sent from my Mac
On 19 Apr 2014, at 03:18, Adam Armstrong <adama@memetic.orgmailto:adama@memetic.org> wrote:
You can easily ascertain this by looking at the code.
It's actually quite well documented in the code, and is not a reliable value, really.
adam.
On 2014-04-18 19:34, Jake Turner wrote: Hi Does anybody know where the ‘ifLastChange’ field in the DB gets set? I’m trying to add in a script that will pull the last change time using SNMP from Cisco devices (I already know how to do this) and then add this into the db instead of wherever it get’s set by default. The reason I want to do this is because the alerts at present can be slightly misleading. When I ignore a down interface (say it’s been down a week) and then remove the ignore flag, the interface shows as being down since the time the ignore flag was removed. This could lead to chasing tails trying to figure out why an interface has gone down when in fact it hasn’t been up for a week. Happy Easter to all too :) Jake Turner On 13 Apr 2014, at 06:28, Jake Turner <Jake.Turner@turnerhouse.org.ukmailto:Jake.Turner@turnerhouse.org.uk> wrote: Hi all, I can't seem to see this feature on the port details page or the 'all ports' list but forgive me if it is visible somewhere. It would be useful to have a 'last changed' time (30 mins ago) etc... on the port details page. This info can be gained from SNMP and from what I can see is already in the DB so it would just be a case of adding it to the page code. Thanks Jake _______________________________________________ observium mailing list observium@observium.orgmailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium _______________________________________________ observium mailing list observium@observium.orgmailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
On 2014-04-18 21:34, Jake Turner wrote:
Hmm, not sure what documentation is in the code, perhaps I was looking at the wrong files.
It would appear however that the ifLastChange field is only changed whenever that particular record gets ‘updated’. The MySQL column has 'on update CURRENT_TIMESTAMP’ as it’s attribute.
I’m thinking of removing that and creating a separate script to update this column with the interface change time as reported by the device.
If you're not capable of finding where it's updated in the code, you possibly don't want to be modifying the code you can't be bothered to read.
adam.
Thank you for your reply. I take it from your response that there is some code that will update the ifLastChange field.
Unfortunately I can not find it anywhere and as a desperate attempt to see if it were specified anywhere I performed a very dirty search: 'grep -r "ifLastChange" /etc/observium/‘ which yielded nothing of any significance.
Sorry if you feel I’m being retarded but I simply can’t find it :/
Jake Turner
On 19 Apr 2014, at 03:58, Adam Armstrong <adama@memetic.orgmailto:adama@memetic.org> wrote:
On 2014-04-18 21:34, Jake Turner wrote: Hmm, not sure what documentation is in the code, perhaps I was looking at the wrong files. It would appear however that the ifLastChange field is only changed whenever that particular record gets ‘updated’. The MySQL column has 'on update CURRENT_TIMESTAMP’ as it’s attribute. I’m thinking of removing that and creating a separate script to update this column with the interface change time as reported by the device.
If you're not capable of finding where it's updated in the code, you possibly don't want to be modifying the code you can't be bothered to read.
adam. _______________________________________________ observium mailing list observium@observium.orgmailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
Line 623 and below of includes/polling/ports.inc.php.
This should use the port's ifLastChanged if it exists, else it'll use the current polling time. At some point we decided it was totally unrealiable and decided to track it ourselves by having the database update the value when the port configuration in the database changed.
It sounds more like you'd want the "down since" number calculation changed to include the total time that the alert wasn't up (or unknown).
adam.
On 2014-04-18 22:58, Jake Turner wrote:
Thank you for your reply. I take it from your response that there is some code that will update the ifLastChange field.
Unfortunately I can not find it anywhere and as a desperate attempt to see if it were specified anywhere I performed a very dirty search: 'grep -r "ifLastChange" /etc/observium/‘ which yielded nothing of any significance.
Sorry if you feel I’m being retarded but I simply can’t find it :/
Jake Turner
On 19 Apr 2014, at 03:58, Adam Armstrong adama@memetic.org wrote:
On 2014-04-18 21:34, Jake Turner wrote:
Hmm, not sure what documentation is in the code, perhaps I was looking at the wrong files. It would appear however that the ifLastChange field is only changed whenever that particular record gets ‘updated’. The MySQL column has 'on update CURRENT_TIMESTAMP’ as it’s attribute. I’m thinking of removing that and creating a separate script to update this column with the interface change time as reported by the device.
If you're not capable of finding where it's updated in the code, you possibly don't want to be modifying the code you can't be bothered to read.
adam. _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
Weird, my /includes/polling/ports.inc.php file only has 617 lines.
Cisco devices at least report the time that the system was up when the interface changed and I don’t mind having to calculate him many days/hours/minutes etc that was and then displaying that on the appropriate page.
I see what you’re saying when it comes to providing the most compatibility with all the different vendors as they probably report it slightly different (or not at all) and so updating it with 'on update CURRENT_TIMESTAMP’ ensures that you’ll always have something there. I only have Cisco devices though so it’s not too much of a problem.
Thanks, I’ll do some more digging tomorrow, need to sleep now!
Jake Turner
On 19 Apr 2014, at 05:10, Adam Armstrong <adama@memetic.orgmailto:adama@memetic.org> wrote:
Line 623 and below of includes/polling/ports.inc.php.
This should use the port's ifLastChanged if it exists, else it'll use the current polling time. At some point we decided it was totally unrealiable and decided to track it ourselves by having the database update the value when the port configuration in the database changed.
It sounds more like you'd want the "down since" number calculation changed to include the total time that the alert wasn't up (or unknown).
adam.
On 2014-04-18 22:58, Jake Turner wrote: Thank you for your reply. I take it from your response that there is some code that will update the ifLastChange field. Unfortunately I can not find it anywhere and as a desperate attempt to see if it were specified anywhere I performed a very dirty search: 'grep -r "ifLastChange" /etc/observium/‘ which yielded nothing of any significance. Sorry if you feel I’m being retarded but I simply can’t find it :/ Jake Turner On 19 Apr 2014, at 03:58, Adam Armstrong <adama@memetic.orgmailto:adama@memetic.org> wrote: On 2014-04-18 21:34, Jake Turner wrote: Hmm, not sure what documentation is in the code, perhaps I was looking at the wrong files. It would appear however that the ifLastChange field is only changed whenever that particular record gets ‘updated’. The MySQL column has 'on update CURRENT_TIMESTAMP’ as it’s attribute. I’m thinking of removing that and creating a separate script to update this column with the interface change time as reported by the device. If you're not capable of finding where it's updated in the code, you possibly don't want to be modifying the code you can't be bothered to read. adam. _______________________________________________ observium mailing list observium@observium.orgmailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium _______________________________________________ observium mailing list observium@observium.orgmailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
Are you running some horrifically old version?
root@alpha:/home/observium/dev# wc -l includes/polling/ports.inc.php 719 includes/polling/ports.inc.php
adam.
On 2014-04-18 23:32, Jake Turner wrote:
Weird, my /includes/polling/ports.inc.php file only has 617 lines.
Cisco devices at least report the time that the system was up when the interface changed and I don’t mind having to calculate him many days/hours/minutes etc that was and then displaying that on the appropriate page.
I see what you’re saying when it comes to providing the most compatibility with all the different vendors as they probably report it slightly different (or not at all) and so updating it with 'on update CURRENT_TIMESTAMP’ ensures that you’ll always have something there. I only have Cisco devices though so it’s not too much of a problem.
Thanks, I’ll do some more digging tomorrow, need to sleep now!
Jake Turner
On 19 Apr 2014, at 05:10, Adam Armstrong adama@memetic.org wrote:
Line 623 and below of includes/polling/ports.inc.php.
This should use the port's ifLastChanged if it exists, else it'll use the current polling time. At some point we decided it was totally unrealiable and decided to track it ourselves by having the database update the value when the port configuration in the database changed.
It sounds more like you'd want the "down since" number calculation changed to include the total time that the alert wasn't up (or unknown).
adam.
On 2014-04-18 22:58, Jake Turner wrote:
Thank you for your reply. I take it from your response that there is some code that will update the ifLastChange field. Unfortunately I can not find it anywhere and as a desperate attempt to see if it were specified anywhere I performed a very dirty search: 'grep -r "ifLastChange" /etc/observium/‘ which yielded nothing of any significance. Sorry if you feel I’m being retarded but I simply can’t find it :/ Jake Turner On 19 Apr 2014, at 03:58, Adam Armstrong adama@memetic.org wrote: On 2014-04-18 21:34, Jake Turner wrote: Hmm, not sure what documentation is in the code, perhaps I was looking at the wrong files. It would appear however that the ifLastChange field is only changed whenever that particular record gets ‘updated’. The MySQL column has 'on update CURRENT_TIMESTAMP’ as it’s attribute. I’m thinking of removing that and creating a separate script to update this column with the interface change time as reported by the device. If you're not capable of finding where it's updated in the code, you possibly don't want to be modifying the code you can't be bothered to read. adam. _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
I am running 0.13.10 (rev. 4585) so yes, a pretty old version. I will update asap and that should shed a little more light (Y).
Cheers
Jake Turner
On 19 Apr 2014, at 05:35, Adam Armstrong <adama@memetic.orgmailto:adama@memetic.org> wrote:
Are you running some horrifically old version?
root@alpha:/home/observium/dev# wc -l includes/polling/ports.inc.php 719 includes/polling/ports.inc.php
adam.
On 2014-04-18 23:32, Jake Turner wrote: Weird, my /includes/polling/ports.inc.php file only has 617 lines. Cisco devices at least report the time that the system was up when the interface changed and I don’t mind having to calculate him many days/hours/minutes etc that was and then displaying that on the appropriate page. I see what you’re saying when it comes to providing the most compatibility with all the different vendors as they probably report it slightly different (or not at all) and so updating it with 'on update CURRENT_TIMESTAMP’ ensures that you’ll always have something there. I only have Cisco devices though so it’s not too much of a problem. Thanks, I’ll do some more digging tomorrow, need to sleep now! Jake Turner On 19 Apr 2014, at 05:10, Adam Armstrong <adama@memetic.orgmailto:adama@memetic.org> wrote: Line 623 and below of includes/polling/ports.inc.php. This should use the port's ifLastChanged if it exists, else it'll use the current polling time. At some point we decided it was totally unrealiable and decided to track it ourselves by having the database update the value when the port configuration in the database changed. It sounds more like you'd want the "down since" number calculation changed to include the total time that the alert wasn't up (or unknown). adam. On 2014-04-18 22:58, Jake Turner wrote: Thank you for your reply. I take it from your response that there is some code that will update the ifLastChange field. Unfortunately I can not find it anywhere and as a desperate attempt to see if it were specified anywhere I performed a very dirty search: 'grep -r "ifLastChange" /etc/observium/‘ which yielded nothing of any significance. Sorry if you feel I’m being retarded but I simply can’t find it :/ Jake Turner On 19 Apr 2014, at 03:58, Adam Armstrong <adama@memetic.orgmailto:adama@memetic.org> wrote: On 2014-04-18 21:34, Jake Turner wrote: Hmm, not sure what documentation is in the code, perhaps I was looking at the wrong files. It would appear however that the ifLastChange field is only changed whenever that particular record gets ‘updated’. The MySQL column has 'on update CURRENT_TIMESTAMP’ as it’s attribute. I’m thinking of removing that and creating a separate script to update this column with the interface change time as reported by the device. If you're not capable of finding where it's updated in the code, you possibly don't want to be modifying the code you can't be bothered to read. adam. _______________________________________________ observium mailing list observium@observium.orgmailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium _______________________________________________ observium mailing list observium@observium.orgmailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
participants (3)
-
Adam Armstrong
-
Jake Turner
-
Tom Laermans