etsy / opsweekly Goto Github PK
View Code? Open in Web Editor NEWOn call alert classification and reporting
License: MIT License
On call alert classification and reporting
License: MIT License
PHP 5.4 (or higher), including the curl extensions for PHP, MySQL extension, and short_open_tags enabled.
A bit more details in this list would be great. Initially I compiled php with mysqln and pdo support, code thought mysql extension prerequisites are satisfied, but each query run was failing. It turned out I need mysqli extension.
Had curl extension compiled, but pagerduty and github providers were failing to retrieve info, turned out need openssl extension too.
LDFLAGS=-Wl,-R/usr/local/lib ./configure --with-apxs2=/usr/local/bin/apxs --with-config-file-path=/usr/local/etc/php.ini --with-config-file-scan-dir=/usr/local/etc/php/conf.d/ --with-curl --with-mysql --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-openssl=shared
extension=openssl.so
allow_url_fopen = on
php_value max_input_vars 10000
short_open_tag = on
extension=php_mysqli.so
[Date]
date.timezone = "UTC"
Any dockerfile available to test Opsweekly ?
Cant seem to get this thing started.
I cloned the repo and changed the config.php inside phplib.
I added the fqdn in the config.php as my ServerName as in my apache2.conf.
root@ravi-ThinkPad-X230:/var/www/html/phplib# facter | grep fqdn
fqdn => ravi-ThinkPad-X230.x.x.x
I have kept the prod_fqdn in config.php as the above. Also changed the first array as specified.
I am still getting the error while loading the project on the browser as
.................................................
$number) { $pct = round( ($number / $total) * 100, 2); $html_status_summary .= "{$type} {$number} ({$pct}%) "; $html_status_bar .= "
"; } $html = '
'; $html .= $html_status_bar; $html .= '
'; $html .= "
{$html_status_summary}
"; return $html; } /* * renderTagTables() * Renders a table of tag summaries for a week or a year */ function renderTagTable($tags, $total, $tag_lookup) { foreach ($tags as $type => $number) { $pct = round( ($number / $total) * 100, 2); $html_status_summary .= "{$tag_lookup[$type]} {$number} ({$pct}%) "; } return '' . $html_status_summary . '
'; } function renderSleepStatus($sleep_statuses, $status_total, $mtts_total, $rtts_count, $ntts_count) { global $sleep_state_icons, $sleep_states; foreach ($sleep_statuses as $type => $number) { $pct = round( ($number / $status_total) * 100, 2); $html_status_summary .= " "; $html_status_summary .= "{$sleep_states[$type]} {$number} ({$pct}%) "; } $html = "{$html_status_summary}
"; $html .= "
Mean Time to Sleep: "; $html .= round( ($mtts_total / $rtts_count) / 60, 2); $html .= " minutes
"; $html .= "
Time spent awake due to notifications: "; $html .= round( ($mtts_total / 60 / 60), 2); $html .= " hours
"; $html .= "
Number of times sleep was abandoned: {$ntts_count} times
"; return $html; } function renderTopNTableBody($input_array, $limit = 10) { if(!is_array($input_array)) { return false; } // Get the top N results // First, sort the array by value arsort($input_array); // Then slice the top N off the top. $a = array_slice($input_array, 0, $limit); $html = ''; foreach($a as $k => $v) { $html .= "{$k}{$v}"; } return $html; } function renderTopNPrettyLine($input_array, $limit = 4) { if(!is_array($input_array)) { return false; } arsort($input_array); $a = array_splice($input_array, 0, $limit); foreach ($a as $k => $v) { $strings[] = "{$k} ({$v} times)"; } return implode($strings, ", "); } I don't know what to do with this FQDN, please add it to config.php
..............................................................
I am new to all this. I might be doing something wrong here.
Hi
Did someone of you integrate opsweekly with icinga i did try with logstash oncall but i cant get icinga stuff in opsweekly . below you can find config file ,any idea
s ?
After running the build in Heroku, the browser returns:
Cannot find config.php! It must be in phplib and named config.php
As it states in the readme, this doesnt work as expected, or kind of works :)
Wondering if its possible...
We have multiple people on call each week, sys, net, dba etc, but we'd like to use opsweekly for the weekly 'ops' meeting, including all 'subteams'
People can see their own notifications on the 'add' page (they're filtered by their username) but if two people save an oncall report, it merges into one, and says it was compiled by the last person to save...looks like this also then adds all notifications that week to their stats?
Thinking it maybe easier to have one install per 'subteam', but loose the ability to have one weekly meeting report including mutliple on call reports.
Not looked through the code yet to see what the best option is...is it easy to make it possible to have multiple on call reports, per week?
Hello community,
Are there any examples that implement Github oauth for Opsweekly?
Thank you!
It would be cool to have opsweekly poll an email account which accepts updates and appends them to a user's record.
Similarly, it could accept updates from any medium, eg Jabber. Maybe some kind of generic plugin interface for accepting updates?
Hello,
Due nature of large alerts amount in big environments there is a need to have filtering for splitting them into office and out of working hours time periods. This would allow separate views on what is happening when people are on call and outside of office. Also sometimes it would be much easer to categorize alerts for visibility and reporting by time periods. For example, the filter Mon-Fri 18:00-9:00 and Sat-Sun 00:00-23:59 would set a view for alerts being received outside of office.
This feature should be not hard to implement by updating calendar functions. Please let me know if this idea would be worked on.
Cheers!
After installing on heroku.com i have the following error when launching : Cannot find config.php! It must be in phplib and named config.php
Not sure if this is intentional or not but we noticed that if user A classifies and notates some events, and then user B goes to do the same for some new events (say, on the following day), user A's updates will be re-labeled as being from user B. Are we just doing it wrong (ie, can only one person update the list for the week?) or did we discover a bug?]
PostgreSQL support would be great!
I'm not sure what it is about our particular installation if its:
But when our team edits their report to document how their on-call week is going, the same incidents will be imported multiple times resulting in a report that is many times the actual number of incidents we experienced.
Is there anything obvious that we should look at?
Hey,
Just trying to get this running, its saying the below currently.
I have added the fields with the FQDN of the server but its still showing the message any ideas?
Details:
I don't know what to do with this FQDN, please add it to config.php
$dev_fqdn = "ops001.dev.company.net";
// The prod FQDN is then subsituted in place of the above string.
$prod_fqdn = "ops001.dev.company.net";
So you can go back and review your recent on-calls
We keep seeing issues with users on windows, they'll click a date in the 'datepicker' and it sends them to the first week in 1970 and the dat picker says its 2070.
Not been able to see whats happening but wondered if anyone else see the same issue? or any idea...all users have timezone set in their profile correctly, php.ini has timezone set to utc.
I am getting the following error on the homepage after install;
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in D:\WebApps\opsweekly\phplib\base.php on line 130
I think I broke it...
Hello guys
Is it possible to setup opsweekly in a way that reports all incidents from all PagerDuty Services.
Right now, the Ops team is on-call for multiple Services and I would like to have one page to view all incidents.
Automate user and team management with LDAP Sync
While experimenting with opsweekly, one of the more confusing issues I faced was why the config for my team wasn't loading. I eventually realized that I had assumed $dev_fqdn
and $prod_fqdn
were optional (even though it doesn't say they are-- my mistake!), and didn't specify them -- causing the preg_replace
to fail, and my $fqdn
appear to be null
!
I want to understand what the use case is for this feature. You hit opsweekly on a vhost for testing, which otherwise loads a team config for a different team, right? Doesn't this cause an issue for every single link that references $fqdn
, because that will link away from the testing environment into prod?
I have a change in waiting that should:
_fqdn
s optionalbut I want to make sure I understand the original inspiration first.
I'm getting the following error while trying to install:
PHP Fatal error: Call to undefined method mysqli_result::fetch_all() in /var/www/html/opsweekly/phplib/base.php on line 213
Any idea what I've done wrong?
It seems like it would be nice for README.md to have a "Deploy to Heroku" button, like this project over here: https://github.com/stripe/pagerbot. We'd (PagerDuty) be happy to add a small bounty on BountySource if anyone else would like to see this added. :)
They can span more than a year, so they're super confusing without full dates.
Would be nice to have a gitlab provider :)
There's no activity api like there is with github events, but you can get activity for a user from the XML parser. Nasty but it'd work
Hi there,
I am receiving this error from the Pagerduty provider.
PHP Warning: Invalid argument supplied for foreach() in /var/www/opsweekly/providers/oncall/pagerduty.php on line 109, referer: http://localhost/add.php
I don't think the returned JSON data has this key: 'trigger_summary_data'.
Steps to reproduce:
Config settings:
$pagerduty_api_key='SOME_API_KEY'
// Note: I tried both version of the APIS (v1 and 2, same error).
$pagerduty_base_url='https://api.pagerduty.com'
$teams = array( $hostname => array( "root_url" => ".", "display_name" => "Ops", "email_report_to" => $email_report_to, "database" => "opsweekly", "event_versioning" => "off", "oncall" => array( "provider" => "pagerduty", "provider_options" => array( "pagerduty_service_id" => array('OUR_ACTUAL_SERVICE_ID'), ), "timezone" => "America/New_York", "start" => "friday 18:00", "end" => "friday 18:00", ), "weekly_hints" => array(), "irc_channel" => "#ops" ), );
$oncall_providers = array( "pagerduty" => array( "display_name" => "Pagerduty", "lib" => "providers/oncall/pagerduty.php", "options" => array( "base_url" => $pagerduty_base_url, "apikey" => $pagerduty_api_key, ), ), );
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.