As my home monitoring experiment has become such a celebrity and as it has so much going on, I’m trying to make sure I won’t ever lose its configuration and data, no matter what would happen. Here are some tips and reminders for you, too.
In the IT world, so much can go wrong. Hardware can die, files can become corrupt, malware can hit you, hackers can breach your systems, buggy software updates can cause havoc, you can fat-finger some commands or click on the wrong place and remove data… the list is endless. Here are some ways I’m attempting to protect my home monitoring environment.
Keep software updated
First things first. In today’s malicious world, it’s mandatory that you keep your software updated. With Linux and Zabbix, you don’t have an excuse to skip the updates. Updating your systems is fast and trouble-free. In small environments like home, even major Zabbix upgrades are fast as the database is not very big, so the database migrations that in a corporate environment can take time, will go through in minutes if not faster.
But I don’t trust one environment. What if my BackupPC says Kaboom? A nightly cron job also copies backup archives from my Raspberry Pi to my Mac, which in turn mirrors the backups to my iCloud. And, there’s one more cloud service I’m using for all my backups but not mentioning it here by name.
Test your backups
As long as you have not verified that your backups do actually work, you do not have a working backup. Have a virtual machine into which you can try to restore your backups. See if they work. Test them periodically, either manually or figure out an automated way to do that.
In the case of Zabbix, you can make your primary Zabbix monitor your test environment, and make Zabbix alert if your restore environment Zabbix suddenly starts responding back something else than the regular login page, or if the restore environment database doesn’t come back with some query response you would expect.
Setup a HA cluster
As any hardware can die, it’s not a bad idea to set up a HA cluster. Last winter I was preparing for potential electricity blackouts here in Finland and did setup my laptop to be a secondary node for my Zabbix. This setup has been working very well.
Use strong passwords
Even if it would only be your sandbox environment where you do test new stuff, please remember to use strong passwords. An evil actor can attempt to breach more targets in your network through a single point of failure.
Use ssh keys
Instead of username + password combination, use ssh keys for ssh authentication. Keys are immune to brute-force attempts and with tuning, ssh keys can also be allowed to only connect from specific IPs and run only specific commands. You know how in your ~/.ssh/authorized_keys the lines do start with something like
Obviously, this grants you much more security than traditional logins.
Use HashiCorp Vault
OK, I admit I’m not doing this at home as it would be overkill for my few logins. But, in a larger environment with absolutely critical safety requirements, use HashiCorp Vault for protecting your credentials. Zabbix has native support for it.
Monitor your logs
Setup a centralized log server — it can be your Zabbix server environment, too — and make sure you monitor the logs. My Zabbix gets all my logs, but wouldn’t be a bad idea to use more advanced log monitoring tools, too. Since I already do have ElastiFlow running at home, at some point I might start utilizing Elasticsearch for the logs. Not doing it much yet.
Use chkrootkit, AIDE, others
Tools like AIDE or chkrootkit can help you detect an intrusion. Set them to run in your cron and get alerted in case of any anomalies. Maybe I’ll one day integrate Zabbix with these tools.
Firewall your environment, use VPN
Don’t allow direct access from the Internet to your Zabbix, or your database, or anything really. In my case, my Asus router allows setting up OpenVPN connections, so that’s what I use. Whilst on the go, I just connect to OpenVPN on my phone and do whatever I need remotely through that.
Anything else?
Did I miss something? Let me know in the comments.
This post was originally published on the author’s page.
A network of more than 40 partner organisations in over 30 countries works with us to grow and sustain the worldwide Code Club and CoderDojo networks of coding clubs for young people. These organisations, our Global Clubs Partners, share our mission to enable young people to realise their potential through the power of computing and digital technologies. We support them in various ways, and recently we invited them to two calls with our researchers to discuss new research findings about computing education in primary schools.
Three girls in a Code Club session in Brazil.
Supporting Global Clubs Partners with research insights
Global Clubs Partners work to train educators and volunteers, provide access to computing equipment, run clubs and events for young people at a local or national level, and much more. Our aim is to provide support that helps the Global Clubs Partners in their work, including tailored resources and regular group calls where we discuss topics such as volunteer engagement and fundraising.
Educator training in Benin, run by Global Clubs Partner organisation Impala Bridge.
Recently, we were excited to be able to highlight research from our newest seminar series to the network. This ongoing seminar series focuses on teaching and learning in primary (K-5) computing education. Many of the Global Clubs Partners work with schools or local education bodies — some partner representatives even come from a teaching background themselves. That’s why we hoped they would be able to use insights from the seminars in their work, whether with learners and educators directly, or to grow their network of Code Clubs or CoderDojos; we know this is easier for them when they can provide evidence to show why these programmes are so beneficial for young people.
Learning from Global Clubs Partners for our future research
We were also very interested to hear the Global Clubs Partners’ perspectives, as they work in a wide variety of contexts around the world. For example, would the research resonate the same way with an organisation based in Kenya as one based in Nepal? This kind of insight is useful for making decisions about our research work in future.
Each of the two calls featured a speaker from the research seminar series summarising their work and inviting attendees to share their own thoughts. We had some fascinating conversations; with partner representatives from seven countries across four continents, the discussions were a great showcase of the different experiences in our partner network. Dr Bobby Whyte, one of the speakers, noted: “Being able to share and discuss work within a global audience has been a really valuable experience.”
A Code Club session in a classroom in Portugal.
We found the opportunity to connect our partner network with work from other areas of the Foundation really beneficial, and the Global Clubs Partners did too: their feedback from the calls was uniformly positive. Dr Jane Waite, our Senior Research Scientist, commented that “it’s really important for us to share research with people in different contexts and so exciting to hear when findings resonate and can be used in practice.”
Can you verify if your phone battery drains faster during summer compared to other seasons with Zabbix? Of course, you can!
I have always felt that during summer my phone battery drains faster than during the darker seasons. This would only be logical, as during summer the phone display must be brighter than during the darker seasons. Additionally, during summer we also tend to be more outdoors, so instead of home Wi-Fi the phone is using mobile data. On the other hand, during winter time if you are outdoors, the cold weather might affect battery life as well.
But how severe is the drainage difference? Let’s check it out!
Analyzing the data
In June, my iPhone battery average level has been 51%
In April, it was around 67%.
In March, about 71%.
What does this prove?
Well, necessarily not much as this is not a very scientific method. However, my day-to-day phone usage does not vary much — if anything, during March/April the drainage should have been worse, as I have a tendency to participate in one daily afternoon meeting from outdoors; I’ll stroll around with our baby and get some fresh air whilst being online in the meeting. Now in June, I’ve been enjoying my summer holiday. But clearly, something is going on as the average percentage difference is such high. For my Apple Watch, the difference is there but not that significant.
Why am I not comparing the data with the iPhone activity? Heh — to prove my point with my earlier “Things that WILL go wrong when monitoring IoT devices” post; something has happened as my Home Assistant won’t provide that information anymore. The same happened with connection-type data. I’ll have to take a look at that someday, but lately, I’ve been busy as a bee with 1) the summer holiday and 2) preparing material for Zabbix Summit 2023.
Real-world applications for this kind of cherry-picking
Even though this post is very thin in its contents, I’m posting this as a hint for you on how you can utilize Zabbix in more serious monitoring targets in this way. Need to compare UPS battery depletion rate? Disk space usage rate? CPU usage? Concurrent connections? Whatever the data, many times it’s useful to stop for a moment and compare how things were (some time units) ago.
Yes, you can simply pick a longer time period in Zabbix time picker and see the data for one year or whatever, and most of the time it will show you a change in pattern, but if the changes are more subtle or the graph is very busy, sometimes zooming in to shorter time periods in history will show you something that you might otherwise miss.
For example, if I expand the time range for the battery usage, not only you’ll notice that the Home Assistant iCloud ride has been a bumpy one, but also the details do get lost when the time range is longer.
More ways to compare historical data
I didn’t build any new graphs or dashboards for this quick experiment, I merely used the time picker. In case one would need to have comparison data available at any time, using time shift and additional data sets would help you out. And, like many of us do, one way to dive deeper into data collected by Zabbix would be to analyze it in Grafana, but that’s a story for another day.
I have been working at Forcepoint since 2014 and I’m happy that my work won’t drain my personal battery. — Janne Pikkarainen
This post was originally published on the author’s page.
We love hearing from members of the community and how they use their passion for computing and digital making to inspire others. Our community stories series takes you on a tour of the globe to meet educators and young tech creators from the USA, Iraq, Romania, and more.
For our latest story, we are in the UK with Spencer, a Computer Science teacher at King Edward VI Sheldon Heath Academy (KESH), Birmingham. After 24 years as a science teacher, Spencer decided to turn his personal passion for digital making into a career and transitioned to teaching Computer Science.
Meet Spencer
From the moment he printed his name on the screen of an Acorn Electron computer at age ten, Spencer was hooked on digital making. He’s remained a member of the digital making community throughout his life, continuing to push himself with his creations and learn new skills whenever possible. Wanting to spread his knowledge and make sure the students at his school had access to computer science, he began running a weekly Code Club in his science lab:
“Code Club was a really nice vehicle for me to get students into programming and digital making, before computer science was an option at the school. So Code Club originally ran in my science lab around the Bunsen burners and all the science equipment, and we do some programming on a Friday afternoon making LEDs flash and a little bit of Minecraft. And from that, the students really got an exciting sense of what programming and digital making could be.”
– Spencer
While running his Code Club, Spencer really embedded himself in the Raspberry Pi community, attending Raspberry Jams, engaging with like-minded people on Twitter, and continuing to rely on our free training to upskill.
When leadership at KESH began to explore introducing Computer Science to the curriculum, Spencer knew he was the right person for the job, and just where to look to make sure he had the right support:
“So when I decided to change from being a science teacher to a computer science teacher, there were loads of course options you could find online, and a lot of them required some really specific prior knowledge and skills. The Foundation’s resources take you from a complete novice, complete beginner — my very first LED flashing on and off — to being able to teach computational thinking and algorithms. So it was a really clear progression from using the Foundation resources that helped take me from a Physics teacher, who could use electricity to light and LED on, to a programmer who could teach how to use this in our digital making for our students.”
– Spencer
Thanks to the support from KESH and Spencer’s compelling can-do attitude, he was soon heading up a brand-new Computer Science department. This was met with great enthusiasm from the learners at KESH, with a willing cohort eagerly signing up for the new subject.
“It’s really exciting to see how students have embraced Computer Science as a brand-new subject at school. The take-up for our first year at GCSE was fantastic with 25 students, and this year I’ve really got students asking about, ‘Is there an option for next year, and how can I get on to it?’ Students are almost blown away by the resources now.”
– Spencer
Supporting all students
Spencer has a mission to make sure all of KESH’s learners can learn about computing, and making his lessons accessible to all means he’s become a firm favourite amongst the students for his collaborative teaching approach.
“Mr Organ teaches you, and then he just puts you in. If you do need help, you can ask people around you, or him, but he lets you make your own mistakes and learn from there. He will then give you help so you don’t make those mistakes the next time.”
Spencer’s work is shaped by his awareness that many of the learners at KESH come from under-resourced areas of Birmingham and backgrounds that are underrepresented in computing. He knows that many of them have previously had limited opportunities to use digital tools. This is something he is driven to change.
“I want my young students here, regardless of their background, regardless of their area they’ve been brought up in, to have the same experiences as all other students in the country. And the work I do with Raspberry Pi, and the work I do with Code Club, is a way of opening those doors for our young people.”
– Spencer
Share Spencer’s story and inspire other educators
As a passionate member of the Raspberry Pi Foundation community, Spencer has been counted on as a friendly face for many years, sharing his enthusiasm on training courses, at Foundation events, and as a part of discussions on Twitter. With the goal to introduce Computer Science at A level shortly, and an ever-growing collection of digital makes housed in his makerspace, Spencer shows no signs of slowing down.
If you are interested in changing your teaching path to focus on Computer Science, take a look at the free resources we have available to support you on your journey.
Help us celebrate Spencer and his dedication to opening doors for his learners by sharing his story on Twitter, LinkedIn, and Facebook.
When reading this blog, you could easily think that everything is smooth sailing all the time. No. When you monitor your home IoT — or frankly, just USE your home IoT — you have plenty of small details to watch out for. I list them for you, so you don’t have to find them out the hard way like I’ve done over this 1+ year of journey.
1. The status is not what it seems
This is especially true with the IoT devices operating on 433 MHz radio frequency. Your home smart hub sends the signal like a radio station hoping for your IoT device to catch it, and to my understanding, it does not get a reply back from the device. If anything is interfering with the signal, your device will miss the signal and thus your home smart hub will be showing the wrong status.
So, you will need to either get rid of these devices and replace them with devices that use a two-way communication protocol such as ZigBee or if that’s not possible, to set up extra monitoring to try to guess if the command your home smart hub sent actually went through. Did you attempt to power on/off a smart power socket connected to a radiator? Keep an eye on the smart temperature meter and react soon if the temperature does not start to rise after the power socket got powered on, or so.
2. Battery-low messages can be deceiving
Two of my Philips Hue motion sensors have been complaining about low battery status for about six months now, but they are still operating just fine. I’ll let you know when I finally have to replace the batteries on them.
On the contrary, the batteries on some 433 MHz frequency Telldus thermometers can just die without too much warning. For them, your monitoring need to react fast if the values are not coming in. To make things more complicated, not TOO fast though, as sometimes these thermometers can hibernate for some time before reporting new values; possibly when there’s no change in temperature, they will enter some power save mode or something. I don’t know.
3. Bluetooth devices and 2.4 GHz Wi-Fi can interfere with each other
Even though my devices do not use 2.4 GHz Wi-Fi too much, I have some devices like Sonos smart speaker where it’s a must. So, for example, when playing music through that speaker, it’s possible that my Raspberry Pi 4 cannot hear the RuuviTag environmental sensor very reliably. It did help somewhat when I found out that on my Asus router, it was possible to enable some kind of “Bluetooth coexistence” mode, but it’s not a 100% solution for my issue.
4. Make sure any helper components are really up
Along with Zabbix and Grafana, my Raspberry Pi 4 runs Home Assistant to harvest some values about my iPhone and so on. It runs as a Docker image and generally is stable, but sometimes it just stops working. I have an automatic daily restart of that Docker image and so far that has been a relatively good way to keep the image running.
5. APIs can and will change
Monitoring something over some API? Or through web scenarios? Rest assured that your joy won’t last forever. This is IT, and things just won’t remain the same. SOMETHING is guaranteed to change every now and then and the more your monitoring relies on 3rd party things, the less you can trust that your monitoring just would keep on working. No, it’s likely you will need to alter things every now and then.
6. Monitor your monitoring
Even though Raspberry Pi 4 and Zabbix are very reliable and are very unlikely to cause you any trouble, of course, they can fail, or more likely something else will not be like it should. Your home router or Internet connection can die. Electricity can go down. Hardware can die. If you want to be really sure, monitor your monitoring from outside somehow. Have a separate monitoring running on the cloud somehow.
In our case, the electricity and ISP are very reliable, and Cozify smart home hub has a nice feature where the Cozify cloud will text me if the hub loses connectivity — that’s usually a good indication that either the ISP or power went down. Also, I’m about to roll out a small cron job on this site which would check if my Zabbix has updated a test file in a while. If not, it would indicate my Zabbix would be down or otherwise unreachable, so then whatsuphome.fi could e-mail me.
7. You will get paranoid
With more knowledge comes more pain. With some devices, you’ll start to think that they are going to break soon. As an example, the freezer I keep referring to — sometimes it has short periods of time when its temperature for some reason rises a bit and then it goes down again. I don’t know if that has something to do with the fact that our freezer is one of those which does not form ice everywhere so it’s maintenance-free, or if that’s something else, but we keep observing spikes like this about once a week.
I have been working at Forcepoint since 2014 and have learnt not to trust the technology. — Janne Pikkarainen
This post was originally published on the author’s page.
Can you monitor a USB-connected printer with Zabbix? Of course, you can! But can ChatGPT help set up the monitoring? Well… erm… maybe! By day, I am a Lead Site Reliability Engineer in a global cyber security company, Forcepoint. By night, I monitor my home with Zabbix & Grafana and do some weird experiments with them. Welcome to my blog about the project.
When it comes to printing, I am not laser-sharp. That’s simply because I have not printed anything in a long, long time, and even if I have, it’s been a printer maintained by Someone Else. Yes, I know how to add paper and how to do a ritual dance whilst printing to prevent the printer from doing an annoying paper jam. Yes, I have added some printer servers under Zabbix monitoring at the office. That’s about where my printer wisdom ends.
Nobody buys a printer anymore, except for us
It’s 2023, and nobody prints anymore, or that’s my personal impression. Well, that changed at our home as we enter another domain I understand 0% about. Occasionally my wife is making some clothes for our baby, me, and herself. For that, she’s printing out the source code… the CAD models… well… the blueprints for the clothes. I kid you not, the clothes schematics look so complicated to me and the text-based instructions so alien that I’m sure the instructions are not from this planet.
Anyway, my wife found a used HP LaserJet Pro MFP M28a for us for a steal. No, not a literal steal, but for 40 euros, which did sound cheap to me, so we bought it. Of course, normal human beings would just connect the printer to their laptop/desktop and be done with it. However, you know how this story continues.
Flirting with ChatGPT
I went to Zabbix integrations and was sure I would be able to easily find out how to monitor a USB-connected printer. I’ll just search and… what? Nothing? No worries! We have the community templates! I’ll just quickly grab a template from there…. the empty result set, AGAIN? Monitoring SNMP-enabled printers is a different story, for that Zabbix can suit you very well, but just try to find out something for USB-connected printers. I know I could probably monitor my printer by spying cups but I’m not sure if it could return the details I wanted.
With my experiments, I’m used to the fact that I cannot get direct answers to my monitoring needs using search engines, as I’m doing stuff that not too many have done. Even if they have, they might not have blogged about it. That’s ok, but as this was about printing which is a common topic, I decided to try out what happens if I try out ChatGPT. I did the tests with the free ChatGPT 3.5, the new ChatGPT 4 would probably be a different ride.
Here’s our lovely little chat.
Me: I have an HP LaserJet MFP M28a monochrome laser printer connected to USB. How do I get its remaining toner level through the command line on Ubuntu 22.04?
ChatGPT: You can get the remaining toner level of your HP LaserJet MFP M28a monochrome laser printer through command line on Ubuntu 22.04 by following these steps:
Install the “hplip” package by running the following command in the terminal:
sudo apt-get install hplip
Once the installation is complete, run the following command to set up your printer:
sudo hp-setup -i
Follow the instructions provided by the setup wizard to configure your printer.
After the printer is set up, run the following command to get the remaining toner level:
hp-systray -x
This will launch the HP Device Manager, which displays the toner level for your printer.
Alternatively, you can also run the following command to get the toner level directly in the terminal:
hp-levels -n
This will display the toner level in a percentage format.
Me: None of those worked as hp-levels and hp-systray require QT4 and D-Bus. Let’s use ipptool instead.
ChatGPT: Sure, we can use the ipptool command to get the remaining toner level of your HP LaserJet MFP M28a monochrome laser printer on Ubuntu 22.04.
Here are the steps to follow:
Make sure your printer is connected to the computer and turned on.
Open the terminal on your Ubuntu 22.04 machine.
Run the following command to install the CUPS and IPP utilities:
sudo apt-get install cups-ipp-utils
Run the following command to find the printer’s URI:
lpinfo -v
The output should contain a line with the URI of your printer, which will look something like this:
ipp://HP_LaserJet_MFP_M28a.local:631/ipp/print
Run the following command to get the remaining toner level:
That’s it! This is how you can use the ipptool command to get the remaining toner level of your HP LaserJet MFP M28a monochrome laser printer on Ubuntu 22.04.
* * *
The latest tip really did work, so we’re off to a very good start with ChatGPT! Next, I tried asking if it could create a Zabbix template for me, but even though it really tried, it did fail.
Adding printer to Zabbix
So, before continuing with the failed ChatGPT attempt, let’s add this printer to monitoring, as that’s the reason you are reading this blog anyway. I was very surprised about the detail level of the ipptool output: everything from supported paper sizes to printing options to other usual details, but then also some dynamic details like printer uptime.
I wanted to add those dynamic details, so I read through the output and added the details in the way you already know me doing:
Zabbix then reads that text file to a master item, and with dependent items and item preprocessing cherry-picks the interesting details
In screenshots, like this.
Does it work?
Of course, it does, as this routine is what I’ve done so many times before in this blog. Here’s the result. And yes, the toner will likely run out soon — this is a used printer and it’s complaining about low toner level every time we print. An interesting experiment to see how many pages we can still print before it actually runs out of juice. For “0% left”, as also reported by other tools, the printer does an excellent job.
Back to ChatGPT we go
If I would copy-paste my complete chat with ChatGPT, this blog post would become ridiculously long. Communicating with ChatGPT was like with a hyper-active intern who proceeds to do SOMETHING only to realize moments later that whatever it did was completely else than what you asked for. Probably I’m just a sucky ChatGPT prompter.
To get you an idea of how ChatGPT failed, here’s a summary of how it failed:
It really attempted to create YAML-based template files for me.
Unfortunately, when attempting to import the templates to Zabbix, that part failed every time
When I told the error messages to ChatGPT, it attempted to fix its errors, but in weird ways. Sometimes it changed the template in drastic ways, even if it was supposed to only add or modify a single line of it. Multiple times, it decided to change the format from YAML to XML unless I demanded it to stay on YAML
Here are a few snippets from the chat. Maybe at some point, I’ll throw in some money to try out ChatGPT 4.
… this went on and on until I gave up. In conclusion: this time ChatGPT nudged me in to correct direction to get the desired output about the printer info (although a sharp-eyed reader might notice I hinted it about the tool I’d like to use and how I might after all know more about printers than I pretended during this blog post…). Then, ChatGPT ran out of ink when it tried to generate the Zabbix templates. It’s scary advanced anyway, and someday I will try out the more advanced ChatGPT 4.
I have been working at Forcepoint since 2014 and luckily I don’t suffer about the empty paper syndrome very often. — Janne Pikkarainen
This post was originally published on the author’s page.
Can you monitor your mobile data usage with Zabbix? Of course, you can! By day, I am a Lead Site Reliability Engineer in a global cyber security company Forcepoint. By night, I monitor my home with Zabbix & Grafana Labs and do some weird experiments with them. Welcome to my blog about this project.
As it is Easter (the original blog post was published two months ago), this entry is a bit short but as I was remoting into my home systems over VPN and my phone, I got this blog post idea.
When on the go, I tend to stay connected to my home network over VPN. Or rather, an iOS Shortcut pretty much runs OpenVPN home profile for me whenever I exit my home.
My Zabbix collects statistics from my home router over SNMP, and as usual, the data includes per-port traffic statistics. VPN clients are shown as tunnel interfaces so Zabbix LLD picks them up nicely.
So, as a result, I get to see how much traffic my phone consumes whenever I’m using a mobile VPN. Here are seven-day example screenshots from ZBX Viewer mobile app.
VPN connection bits sent.
VPN connection bits received
So, from this data I could get all the statistics I need. And, using my ElastiFlow setup, could likely see to where my phone has been connecting to most.
This post was originally published on the author’s page.
I’m entering a whole new level of monitoring and “What’s up, home?” could now also be called “What’s up, me?”. Recently my colleague did hint to me about Home Assistant’s HomeKit Controller integration just to get my HomeKit-compatible Netatmo environmental monitoring device to get to return value back to Zabbix without my Siri kludge. One thing lead to another and now I’m monitoring my iPhone and Apple Watch — so, practically monitoring myself.
But how to get to this level? Let’s rewind a bit.
Home Assistant
Home Assistant is a nice home automation software. It is open source and provides many, many integrations for automating your home. I now have my Netatmo comfortably monitored through that…
Bye-bye, mobile app and my Siri kludge. This screenshot is from Home Assistant.
… but while exploring Home Assistant’s integrations, I came upon its iCloud integration. Oh boy. This takes my monitoring to a whole new level.
But how to get this data to Zabbix?
On Home Assistant, you can go to your account settings and create a Long-lived access token. With that, you then just pass the authorization bearer as part of your HTTP request and you are done. So, like this.
This way you’ll receive your Home Assistant data back in JSON format. As the output is really really really long, and I needed just a relatively small set of data for myself, I cherry-picked those using the above item as the master item and then created a bunch of dependent items.
… and here’s a single item so you get the idea.
Let’s create some dashboards
Now that I have my data in Zabbix, it’s time to create some dashboards. Fascinating that I can now truly monitor my iPhone and Apple Watch like this.
I also created a Grafana dashboard.
Observations
This has been now running for roughly a day for me. Already some observations:
While driving, at traffic lights I tried to see what would happen if I disable the Bluetooth connection between my car and my iDevices. My status was reported as Cycling instead of Automotive for the rest of the trip. Hmm.
Not all the data will be updated in real-time, but there’s a significant lag. Also, it seems I might need to VPN to my home so the data would be updated sooner while I’m not at home.
iPhone’s custom focus modes are not updated to Home Assistant. During the sleep focus mode, the focus mode was reported as On, but for any other mode I tried it only shows Off. Shame, I would have loved to start tracking things like how long it takes for me to put our baby to sleep or how much of the time I’m spending with this blog. That has to wait for now.
But anyway, this thing just opened a whole new Pandora’s box for me to explore.
This post was originally published on the author’s page.
At GitHub, our favorite people are developers. We love to make them happy and productive, and today, on Global Accessibility Awareness Day, we want to celebrate their achievements by sharing some great stories about a few developers with disabilities alongside news of recent accessibility improvements at GitHub that help them do the best work of their lives.
Amplifying the voices of disabled developers
People with disabilities frequently encounter biases that prevent their full and equal participation in all areas of life, including education and employment. That’s why GitHub and The ReadME Project are thrilled to provide a platform for disabled developers to showcase their contributions and counteract bias.
Paul Chiou, a developer who’s paralyzed from the neck down, is breaking new ground in the field of accessibility automation, while pursuing his Ph.D. Paul uses a computer with custom hardware and software he designed and built, and this lived experience gives him a unique insight into the needs of other people with disabilities. The barriers he encounters push him to innovate, both in his daily life and in his academic endeavors. Learn more about Paul and his creative solutions in this featured article and video profile.
Becky Tyler found her way to coding via gaming, but she games completely with her eyes, just like everything else she does on a computer, from painting to livestreaming to writing code. Her desire to play Minecraft led her down the path of open source software and collaboration, and now she’s studying computer science at the University of Dundee. Learn more about Becky in this featured article and video profile.
Dr. Annalu Waller leads the Augmentative and Alternative Communication Research Group at the University of Dundee. She’s also Becky’s professor. Becky calls her a “taskmaster,” but the profile of Annalu’s life shows how her lived experience informed her high expectations for her students—especially those with disabilities—and gave her a unique ability to absorb innovations and use them to benefit people with disabilities.
Anton Mirhorodchenko has difficulty speaking and typing with his hands, and speaks English as a second language. Anton has explored ways to use ChatGPT and GitHub Copilot to not only help him communicate and express his ideas, but also develop software from initial architecture all the way to code creation. Through creative collaboration with his AI teammates, Anton has become a force to be reckoned with, and he recently shared his insights in this guide on how to harness the power of generative AI for software development.
npm is the default package manager for JavaScript and the largest software registry in the world. To empower every developer to contribute to and benefit from this amazing resource, the npm team recently completed an accessibility bug bash and removed hundreds of potential barriers. Way to go, npm team!
The GitHub.com team has also been hard at work on accessibility and they recently shipped several improvements:
Great accessibility starts with design, requiring an in-depth understanding of the needs of users with disabilities and their assistive technologies. The GitHub Design organization has been leaning into accessibility for years, and this blog post explores how it has built a culture of accessibility and shifted accessibility left in the GitHub development process.
When I think about the future of technology, I think about GitHub Copilot—an AI pair programmer that boosts developers’ productivity and breaks down barriers to software development. The GitHub Copilot team recently shipped accessibility improvements for keyboard-only and screen reader users.
GitHub Next, the team behind GitHub Copilot, also recently introduced GitHub Copilot Voice, an experiment currently in technical preview. GitHub Copilot Voice empowers developers to code completely hands-free using only their voice. That’s a huge win for developers who have difficulty typing with their hands. Sign up for the technical preview if you can benefit from this innovation.
Giving back to our community
As we work to empower all developers to build on GitHub, we regularly contribute back to the broader accessibility community that has been so generous to us. For example, all accessibility improvements in Primer are available for direct use by the community.
Our accessibility team includes multiple Hubbers with disabilities—including myself. GitHub continually improves the accessibility and inclusivity of the processes we use to communicate and collaborate. One recent example is the process we use for retrospectives. At the end of our most recent retrospective, I observed that, as a person with blindness, it was the most accessible and inclusive retrospective I have ever attended. That observation prompted the team to share the process we use for inclusive retrospectives so other teams can benefit from our learnings.
More broadly, Hubbers regularly give back to the causes we care about. During a recent social giving event, I invited Hubbers to support the Seeing Eye because that organization has made such a profound impact in my life as a person with blindness. Our goal was to raise $5,000 so we could name and support a Seeing Eye puppy that will eventually provide independence and self-confidence to a person with blindness. I was overwhelmed by the generosity of my coworkers when they donated more than $15,000! So, we now get to name three puppies and I’m delighted to introduce you to the first one. Meet Octo!
Photo courtesy of The Seeing Eye
Looking ahead
GitHub CEO, Thomas Dohmke, frequently says, “GitHub thrives on developer happiness.” I would add that the GitHub accessibility program thrives on the happiness of developers with disabilities. Our success is measured by their contributions. Our job is to remove barriers from their path and celebrate their accomplishments. We’re delighted with our progress thus far, but we are just getting warmed up. Stay tuned for more great things to come! In the meantime, learn more about the GitHub accessibility program at accessibility.github.com.
Can you create a proper weather dashboard with Zabbix? Of course, you can! By day, I am a Lead Site Reliability Engineer in a global cyber security company. By night, I monitor my home with Zabbix & Grafana and do some weird experiments with them.
Since Zabbix 6.0 has provided you an official OpenWeatherMap template. It gives you all the standard weather details: temperature, humidity, and so on, for any location you’d like to observe.
However, by default, Zabbix does not come with a weather map template. Can we add one? Probably. I say probably because it looks like the free OpenWeatherMap account I created might not have enough credentials to show the layers. Still, let’s give this a try!
(And before you ask why I did not just add another custom geomap provider under Zabbix Administration –> General –> Geographical maps — I wanted to have these layer toggles for clouds etc, and that requires custom JavaScript)
Getting OpenWeatherMap account
Just go to the OpenWeatherMap site and create an account for yourself. Soon enough, you’ll get an API key you are supposed to use.
Embedding OpenWeatherMap to Zabbix UI
I found leaflet-openweathermap and even though it’s abandoned, the demo that comes with it seems to work just fine. Embedding that to Zabbix was not that of a big deal.
Clone the git project for yourself
Copy the example somewhere where you can serve it, I did put it on my Zabbix server under /assets/openweathermap/ directory
Load that map in an empty tab to verify you see it works for you
With the default App ID that is bundled with the map the layers do work, but it would not be cool to use the author’s API key as stated in the code
Change the AppID to one you have received … well, at this point it stopped working for me, but if you really need it, OpenWeatherMap is not that expensive
Then you can add it to Zabbix just by inserting a new URL widget and pointing that to your location.
How does it look like?
Here we go! And, as another idea for you, with the URL widget, you can embed any camera input to your dashboard, too, some hints in part 21 of this blog I don’t want to show you our own camera footage, so I added Lauttasaari, Helsinki location — that is where Forcepoint has its office.
Now that’s a weather dashboard for you.
Get alerted
OpenWeatherMap would also support alerts about severe weather conditions, but another option would be to find out your local weather data from your nearest provider and use their open data for this; in Finland for example, Finnish Meteorological Institute has its own open data for one to use. Then just add those to Zabbix via HTTP Agent item type for example much like I did in part 32 of this blog, and you’re done.
I have been working at Forcepoint since 2014 and as you know by now, I have this never-ending drive for monitoring. — Janne Pikkarainen
This post was originally published on the author’s page.
Can you monitor how much you drive your car, even if your car wouldn’t have any way to report back to Zabbix? Of course, you can! By day, I am a Lead Site Reliability Engineer in a global cyber security company. By night, I monitor my home with Zabbix & Grafana and do some weird experiments with them. Welcome to my blog about the project.
Some forewords: Now that our baby girl is over six months old, she has developed some kind of sleeping pattern. It means she goes to bed very early in the evening, around 6pm. Or, I go to the bedroom with her and wait for her to sleep steadily before I exit the bedroom without her noticing. It means I have lots of time to think, and also to play around with apps like iPhone Shortcuts. I have previously done a few Siri & Zabbix experiments and this will be one more.
I did do this shortcut only two days ago and have not actually driven yet, but I verified that the shortcut itself works when I go into my car and start it up. Also, as I don’t want to give out the exact location where we live, for this blog post I faked our car to be located in Santa Claus Village, Rovaniemi.
Let’s get started.
What are you planning?
Even though I already know very well how much I drive — there’s the odometer in our car, a fuel app in my iPhone shows how many liters per month I refuel, and so on, this data is still something that would contribute to my dear single pane of glass, like your company probably wants to have.
My Siri Shortcut is simple: whenever I go to my car and my iPhone connects to car Bluetooth, it’s a clear data point that I’m probably going somewhere, so the shortcut gets my current location and saves its coordinates to a text file in my iCloud.
Next, just like in my previous Siri examples, a Zabbix Agent on my MacBook keeps an eye on this text file, very much like in my FlightGear integration example, Zabbix will then populate the coordinates in Zabbix inventory for my car host. This way, I can project the car location to the Geomap widget.
Let’s create the shortcut
Here’s the shortcut in all its simplicity.
About that Append to Text File… why appending instead of overwriting, I’ll tell you a story some other day.
Why Desktop Directory? I’ll tell you a story some other day.
Next up, Zabbix
On the Zabbix side of the house, the story is like so many times in my posts: read the text file, and using dependent items create the longitude and latitude items.
Wait! You saved it on your Desktop but now it’s in /tmp? I’ll tell you a story about this kludge some other day… or immediately after this caption.
It was easier to get macOS Zabbix Agent to get to read /tmp instead of your home directory, as the security is in the way, so a cronjob syncs the file once per minute to /tmp. Not only that but because in iOS Shortcuts the Append to a text file was the only way I got the shortcut to run without it asking for permission to run, my cronjob is actually like this:
Beautiful? No, but due to reasons I had to do this, and at least it works.
Anyway, then the longitude/latitude-dependent items just use some regular expressions.
Beautiful? No, but it works.
Does it work?
Of course, it does! See for yourself.
Here’s the latest data…
… and here’s the Geomap.
But wait! How does this track your kilometers?
Heh, you got me. It does not. One easy way would be to use Get distance block in iOS Shortcuts. It actually works — you get to choose that yes I will be driving, give me the kilometers. Whenever I do that, I would need a text file containing just one line (which would contain the old location), and getting to that point without your iPhone asking anything ever is not so simple, so for now I gave up.
So, the next part of this will be to use some API and make my Zabbix calculate the distances. That would be cooler anyway, but I’ll find time for that next time. Anyway, from now on Zabbix will know the locations where I have started our car, so the data will be collected from today. I know there are limitations in this implementation, such as that if I start the car and just drive to some place and back without ever stopping the engine, that won’t really give me any results, but this is better than nothing.
I have been working at Forcepoint since 2014 and as you know by now, I have this never-ending drive for monitoring. — Janne Pikkarainen
This post was originally published on the author’s page.
Developers who feel more satisfied in their jobs are better positioned to be more productive. We also know developers can gain a sense of fulfillment by making an impact beyond the walls of their company and elevating their community. An opportunity exists, which developers can meet, to support those who lack access to the financial system. Many countries are working to drive financial inclusion through different motions—to which developers can contribute. GitHub provides a set of tools and services, which can support your developers working to address this need.
For example, in Australia, there is a huge opportunity to continue the work aimed at reaching those who are not currently included in the financial system. There are still a large number of people that don’t have access to important services that many of us take for granted—an opportunity that financial inclusion tries to solve.
Let’s explore these opportunities and how GitHub can help.
Financial inclusion explained
The World Bank defines financial inclusion as providing individuals and businesses access to affordable financial products to meet their needs. This includes products, such as checking accounts, credit cards, mortgages, and payments, which are still not available to over a billion unbanked people around the world. Many of these are women, people living in poverty, and those living outside of large cities.
Open Finance (or Open Banking) is an approach adopted by banks like NAB (National Australia Bank) to help include more individuals in the financial system by providing them access to the best products and services in a secure way that addresses their needs.
To enable financial inclusion and Open Finance, there needs to be a channel to exchange data and services between banks, customers, and trusted partners (fintechs, for example); that is where application programming interfaces (APIs) come in. The easiest way to understand an API is to think of it as a contract between two applications that need a standardized and secure way to talk to each other. Once the contract is created and secured, it can be used anywhere to share data or initiate a financial transaction.
This API-driven innovation lowers barriers for those individuals who may have limited physical access to banks, credit cards, or traditional financial products.
How GitHub can help
The tremendous opportunities for Australia, New Zealand, India, and other countries to enable financial inclusion to its population are dependent on the quality of the APIs. The quality and adoption of the APIs is dependent on creating a great developer experience because they are the ones building the APIs and applications that will leverage them.
GitHub is used by 100 million developers and is widely-recognized as the global home of open source. Developer experience is at the core of everything we do and it empowers developers to do their best work and be happy. But how does GitHub help enable financial inclusion and Open Finance?
The Open Bank Project released a report in 2020 highlighting how providing a great developer experience can drive growth of APIs that enable financial inclusion. Several topics which were highlighted and where GitHub can help are:
1. Create solutions to help people
This is an important motivator for developers. If developers create solutions that can help increase financial inclusion, they should make sure those solutions are available to as many people as possible through the open source community. Since we know that open source is the foundation of more than 90% of the world’s software, there is a great opportunity to collaborate globally and build on solutions that already exist.
Because GitHub is the home of open source and has 100 million developers, there is no better place for developers to create solutions that will make the biggest impact.
2. Running Hackathons
Hackathons, like the Global Open Finance Challenge, which NAB collaborated in and was won by an Aussie start-up, are important for developers to share ideas with other developers and large enterprises. They help developers see what APIs are currently available and enable innovation and collaboration with a global reach. To run a successful hackathon, developers will need to have access to code and documentation, which has been open sourced—and GitHub is a key component to enable this.
3. Recognition for developers
If a developer has worked on a solution that is helping enable financial inclusion, it’s important to ensure their effort is recognized and supported. The most important part of recognizing the awesome work developers do is to make sure there is a single platform where this work can be shared. Thankfully, that platform already exists and any developer, anywhere in the world, can access it for free—it’s GitHub!
At GitHub, we also know that sometimes recognition isn’t enough, and developers need support. This is why the GitHub Sponsors program was created. We also created our GitHub for Startups program which provides support to the startup community around the world—many of whom are important contributors to Open Banking.
4. Documentation
The success of an API is dependent on how easy it is for developers to understand and use. If developers are unable to quickly understand the context of the API, how to connect to it, or easily set it up to test it, then it probably won’t be successful.
The topic of API documentation and API Management is beyond the scope of this post, but it’s important to remember that open source is a key enabler of Open Finance and developers will need a platform to collaborate and share documentation and code. GitHub is the best platform for that, and we have seen at least a 50% increase in productivity when developers leverage documentation best practices enabled by GitHub.
Call to action
Developers have an amazing opportunity to contribute to the financial inclusion work that is happening in Australia and across the world. GitHub can help support developers to address this opportunity by giving them the tools and services they need to be productive and successful.
We’ve recently launched our weekly livestream on LinkedIn Live, GitHub in my Day Job, for those who want to learn more about how GitHub empowers developers across the community while providing guardrails to govern, and remain compliant. So, join us at https://gh.io/dayjob—we can’t wait to have you with us.
On 24 and 25 March, more than 140 members of the Code Club and CoderDojo communities joined us in Cambridge for our first-ever Clubs Conference.
At the Clubs Conference, volunteers and educators came together to celebrate their achievements and explore new ways to support young people to create with technology. The event included community display tables, interactive workshops, discussions,poster sessions, and talks.
For everyone who couldn’t join us in person, we recorded all of the talks that community members gave on the main stage. Here’s what you can learn from the speakers.
Running your club
Jane Waite from our team offered a taste of the research we do and how you can get insights from it to help you run your own coding club. Watch Jane’s talk to learn about the research that informs our projects for your club.
Rhodri Smith, who runs a Code Club, shared how you can use assistive technologies to open your club experience to more young people. Watch Rhodri’s talk for some fantastic tips on how assistive technology can make Code Club accessible to children of all ages and abilities.
Dave Morley, who volunteers at the CoderDojo at Royal Museums Greenwich, presented his way of using Scratch projects to keep engaging Dojo participants. Watch Dave’s talk for tips on how to create your own coding projects for young people.
Tim Duffey, who is part of the West Sound CoderDojo, shared how his Dojo ran successful online sessions during the coronavirus pandemic. Watch Tim’s talk for great advice on how to run successful coding clubs for young people online.
Steph Burton from our team presented new resources we’re working on to help clubs recruit and train volunteers. Watch Steph’s talk for tips on how to recruit new volunteers for your coding club.
Engaging young people in your club
Sophie Hudson, who runs a Code Club in rural Yorkshire, told us how her school’s Code Club turned taking part in Astro Pi Mission Zero into a cross-curricular activity, and how she partnered older learners with younger ones for peer mentoring that engaged new learners in coding. Watch Sophie’s talk to learn how you can get your school involved in Astro Pi, especially if you don’t have much adult support available.
We brought a replica of the Astro Pi computers to the Clubs Conference.
Helen Gardner from our team shared how you can motivate and inspire your coders by supporting them to share their projects in the Coolest Projects showcase — even their very first Scratch animation. Watch Helen’s talk if you’re looking for something new for your club.
The benefits of Code Club and CoderDojo for your community
Fiona Lindsay, who leads a Code Club, presented her insights into the skills beyond coding that young people learn at Code Club, and she shared some wonderful videos of her coders talking about their experience. Watch Fiona’s talk to hear young girls talk about how to get more girls into coding, and for evidence of why every school should have a Code Club.
Last year, Fiona’s Code Club held a special event to celebrate the tenth birthday of Code Club.
Bruce Harms, who is involved in AruCoderDojo, shared how he and his team are making the CoderDojo model part of their wider work to bring digital skills and infrastructure to Aruba. Watch Bruce’s talk to learn how his team has tailored their coding clubs for their local community.
What is volunteering for CoderDojo and Code Club like?
Marcus Davage, who volunteers at a Code Club, shared his journey as a volunteer translator of our resources, and how he engaged colleagues at his workplace in also supporting translations to make coding skills available to more young people across the world. Watch Marcus’s talk if you speak more than one language.
To end the day, we hosted a group of community members onstage to have a chat about their journeys with CoderDojo and Code Club, what they’ve learned, and how they see the future of their clubs. Watch the panel conversation if you want inspiration and advice for getting involved in helping kids create with tech.
Thank you to everyone who gave talks, ran workshops, presented posters, and had conversations to share their questions and insights. It was wonderful to meet all of you, and we came away from the Clubs Conference feeling super inspired by the amazing work Code Club and CoderDojo volunteers all over the world do to help young people learn to create with digital technologies.
We learned so much from listening to you, and we will take the lessons into our work to support you and your clubs in the best way we can.
We meet many young people with an astounding passion for tech, and we also meet the incredible volunteers and educators who help them find their feet in the digital world. Our series of community stories is one way we share their journeys with you.
Today we’re introducing you to Nadia from Maysan, Iraq. Nadia’s achievements speak for themselves, and we encourage you to watch her video to see some of the remarkable things she has accomplished.
Say hello to Nadia
Nadia’s journey with the Raspberry Pi Foundation started when she moved to England to pursue a PhD at Brunel University. As an international student, she wanted to find a way to be part of the local community and make the most of her time abroad. Through her university’s volunteer department, she was introduced to Code Club and began supporting club sessions for children in her local library. The opportunity to share her personal passion for all things computer science and coding with young people felt like the perfect fit.
“[Code Club] added to my skills. And at the same time, I was able to share my expertise with the young children and to learn from them as well.”
Nadia Al-Aboody
Soon, Nadia saw that the skills young people learned at her Code Club weren’t just technical, but included team building and communication as well. That’s when she realised she needed to take Code Club with her when she moved back home to Iraq.
A Code Club in every school in Iraq
With personal awareness of just how important it is to encourage girls to engage with computing and digital technologies, Nadia set about training the Code Club network’s first female-only training team. Her group of 15 trainers now runs nine clubs — and counting— throughout Iraq, with their goal being to open a club in every single school in the country.
Reaching new areas can be a challenge, one that Nadia is addressing by using Code Club resources offline:
“Not every child has a smartphone or a device, and that was one of the biggest challenges. The [Raspberry Pi] Foundation also introduced the unplugged activities, which was amazing. It was very important to us because we can teach computer science without the need for a computer or a smart device.”
Nadia Al-Aboody
Nadia also works with a team of other volunteers to translate our free resources related to Code Club and other initiatives for young people into Arabic, making them accessible to many more young people around the world.
Tamasin Greenough Graham, Head of Code Club here at the Foundation, shares just how important volunteers like Nadia are in actively pushing our shared mission forwards.
“Volunteers like Nadia really show us why we do the work we do. Our Code Club team exists to support volunteers who are out there on the ground, making a real difference to young people. Nadia is a true champion for Code Club, and goes out of her way to help give more children access to learning about computing. By translating resources, alongside overseeing a growing network of clubs, she helps to support more volunteers and, in turn, reach more young people. Having Nadia as a member of the community is really valuable.”
Tamasin Greenough Graham, Head of Code Club
If you are interested in becoming a Code Club volunteer, visit codeclub.org for all the information you need to get started.
Help us celebrate Nadia and her commendable commitment to growing the Code Club community in Iraq by sharing her story on Twitter, LinkedIn, and Facebook.
Can you monitor your website visitor rate with Zabbix? Of course, you can! By day, I am a lead site reliability engineer in a global cyber security company. By night, I monitor my home with Zabbix & Grafana and do some weird experiments with them.
I have this website hosted in a domain hotel, and among other features, the admin panel has some standard website access log analyzers (such as awstats) available for me to see the activity of this site. That’s cool, but also boringly easy, and requires me to log in to that admin panel instead of me using my trusted single pane of glass that is Zabbix.
Let’s connect to site logs
If I log in to my site over ssh/sftp, my home directory has a preconfigured access_logs directory. Like the name says, it contains the website access logs in the usual format you would expect it to be:
That’s great, but how to monitor that in real time with Zabbix? Let’s use sshfs — it’s like NFS or CIFS, but allows you to mount stuff over ssh. On my dear Raspberry Pi 4, which runs my Zabbix, running
did mount my remote server access_logs directory perfectly fine.
Time for monitoring
Now that we have our log file, the rest is very straightforward and standard log file monitoring. First, let’s add a master item that reads the log.
Nothing too difficult yet.
Next, let’s add a dependent item that grabs the visitor IP address part from a log line.
… and some item preprocessing to grab only the IP
Items
Sorry about that ugly regular expression.
… after adding a few more items, here’s my template.
I’m currently not parsing the referrer, exact URL, or user-agent values, as for the most part those would just add unnecessary noise and load for my poor little home Zabbix.
Dashboard time!
So, finally, I created a dashboard showing the number of unique IP addresses & hits during the past 24 hours and some graphs. Now that I’ve not posted any posts in a while, welcome to Tumbleweedville!
It’s so silent in here that I can hear my own typing.
After publishing this post, I’ll wait for a while and then update the post with a new screenshot, so we’ll get to see the incredible visitor surge that will be counted in at least tens of new IP addresses.
Update #1 about 15 minutes after publishing the post
Clearly some movement in the access log needle!
Update #2 about 15 minutes after publishing the post
Almost 400 unique IP addresses already? Hello, dear readers and bots.
Update #3 about 15 minutes after publishing the post
Even though IP addresses are a bad way to measure the actual amount of visitors, roughly 400 unique new addresses after publishing my post are very good. Thanks, bots and readers!
This post was originally published on the author’s page.
While 14 March is an opportunity for our American friends to celebrate the mathematical constant Pi, we are also very happy to make this day a chance to say a massive thank you to everyone who supports the Raspberry Pi Foundation’s work through their generous donations.
You may know that the Raspberry Pi story started in Cambridge, UK, in 2008 when a group of engineers-cum-entrepreuers set out to improve computing education by inventing a programmable computer for the price of a textbook.
Fast forward 15 years and there are 50 million Raspberry Pi computers in the world, being used to revolutionise education and industry alike. Removing price as a barrier for anyone to own a powerful, general-purpose computer will always be an important part of our mission to democratise access to computing.
What we also know today is that access to low-cost, high-quality hardware is essential, but it’s not enough.
If we want all young people to be able to take advantage of the potential offered by technological innovation, then we also need to support teachers to introduce computing in schools, find ways to inspire young people to learn outside of their formal education, and make sure that everything we do is informed by rigorous research.
That’s the focus of our educational mission at the Raspberry Pi Foundation, and we couldn’t do this work without your support.
What we achieve for young people thanks to your support
We are fortunate that a large and growing community of people, corporations, trusts, and foundations makes very generous donations to support our educational mission. It’s thanks to you that we are able to achieve what we do for young people and educators:
In 2022 alone, over 3.54m people engaged with our free online learning resources for young people, including brand-new pathways of projects for HTML/CSS, Python, and Raspberry Pi Pico.
Supported by us, more than 4500 Code Club and CoderDojos are running in 103 countries, and an additional 2891 clubs that were disrupted by the coronavirus pandemic tell us that they are actively planning to start running sessions for young people again soon.
We engaged over 30,000 young people in challenges such as Astro Pi and Coolest Projects, enabling them to showcase their skills, think about how to solve problems using technology, and connect with like-minded peers.
We have supported tens of thousands of computing teachers through our curriculum, resources, and online training. For example, The Computing Curriculum, which we developed as part of the National Centre for Computing Education in England, is now being used by educators all over the world, with 1.7m global downloads in 2022.
We completed and published the findings of the world’s largest-ever research programme testing how to improve the gender balance in computing. We are now working on integrating the insights from the programme into our own work and making them accessible and actionable for practitioners.
Trust me when I say this is just a small selection of highlights, all of which are made possible by our amazing supporters. Thank you, and I hope that we made you proud.
Get involved today
If you haven’t yet made a donation to our Pi Day campaign, it’s not too late to get involved. Your donation will help inspire the next generation of digital technology creators.
Is Raspberry Pi 4 a goodbye or a good buy for running Zabbix? How is it performance-wise? Is it reliable? Here’s my nine-month review of it, with a splash of appliance/application performance monitoring.
In about April 2022 when it became clear that I am going to continue my home monitoring project, I bought a Raspberry Pi 4 to run the show. Here’s my opinion on how well it is suited for running Zabbix.
Installing Zabbix
Applying that delicious layer of Zabbix on top of your Raspberry Pi 4 cake is extremely straightforward, as just like for every other platform that Zabbix officially supports, they do have packages and instructions to set up what you’d like to run.
So many options to choose from!
After installing the packages, the next steps are just like with Zabbix running on any other platform, so I am not going to dive into that now.
Modifications to my Raspberry setup
As I do not need to run a graphical environment on my Raspberry, I did disable the graphical environment from starting at all to save some precious RAM and other resources.
After some time I did also purchase an external USB hard disk, as the memory card from where Raspberry Pi 4 runs its OS is not very snappy, especially with write operations, and can also run tight on free space.
Other than that, my Raspberry Pi 4 is running pretty much by default.
How about the performance?
The graphs that you are about to see are from nine months period of time, as that’s about as long I have had the device.
No problem with the CPU usage. It’s been creeping up a little bit over time though, as I have been adding new items to monitoring and also additional software, such as HomeBridge and Home Assistant.
It still has available memory, even though the device runs Zabbix server, MariaDB, Grafana, Mosquitto, Home Assistant and HomeBridge.
As you can see, the number of running processes has grown significantly as I have been adding other stuff than Zabbix.
It’s easy to see when I did switch from an internal memory card to an external USB drive. The disk I/O utilization percentage is hovering at very tolerable levels.
I/O latency has remained about the same.
With only Zabbix, MariaDB and Grafana running the device remained around the 55-60C area, but has been warming to about 70C with the additional software. Still not too bad.
Splash of APM
Have you ever wondered what happens to the memory usage of a wrapper shell script that runs other scripts in a loop and keeps doing that until it’s manually stopped? This happens, it’s boringly stable. The results are brought you to by Zabbix Agent 2 process discovery.
Really, it does not vary much.
But as I have been adding new stuff, clearly the OS needs to do some more swapping and even the script has more page faults than before.
There’s more than that to process discovery, but those were some examples.
Zabbix server itself is doing very well, here are some example stats.
My conclusion: Raspberry Pi 4 is an excellent Zabbix server for smaller environments and a very good Zabbix proxy candidate. It’s been rock solid.
This post was originally published on the author’s page.
Can you follow the news with Zabbix? Of course, you can! By day, I am a lead site reliability engineer at a global cyber security company. By night, I monitor my home with Zabbix & Grafana and do some weird experiments with them. Welcome to my blog about the project.
A long time ago, before the dawn of social media, RSS (Really Simple Syndication) readers were all the rave. Instead of visiting each site you followed individually, you could add their RSS feeds to your RSS reader, which then would show you the latest news titles from as many sources as you wanted. Not only the titles, but depending on the news site you could also read a teaser or even the full news through your RSS reader without ever visiting the site itself.
Is RSS still a thing?
This was all good for the end-users, but the beancounters at the news companies got worried, as of course without visits to news sites, the advertisement income would come down, too. RSS readers can still be useful, but…. oh, I’ll need to stop, this is not the scope of this blog post.
Instead, the underlying technology of RSS is what makes it interesting. It’s just XML, so easy to consume by whatever software. Even though RSS is not a media darling anymore, it’s useful for gathering info from various sources to be then utilized somewhere else — like in Zabbix.
Let’s follow this site
So, how to follow the latest posts on this site through Zabbix? Easy, as this is just about parsing some XML.
Let’s begin with adding a new HTTP agent item.
With that in place, let’s add some dependent items, with the end result being this:
Each of those is just dependent items with some item pre-processing — the example below parses the first occurrence of title to the text.
How to use this?
In this case, I created a separate dashboard to show the latest blog post title, a link to it and the publication date. Wouldn’t be too hard to create a custom Zabbix module to make this fancier, but let’s leave it for another day. For now, by just using Item value widget types, we get this.
In the real world, there are plenty of actual use cases. Use it to alert you about the latest vulnerabilities, updates or other news about the stuff you have in your environment. Create a news dashboard for your security operations team or developers. If your own products do utilize RSS for something, this also can be very handy for end-to-end testing, as both Zabbix and your eyes can spot visually if something is not right. I’m sure you can come up with more and better ideas.
I have been working at Forcepoint since 2014 and never get tired of the news. — Janne Pikkarainen
This post was originally published on the author’s page.
One of the features of Zabbix proxy is that it can buffer the collected monitoring data if connectivity to Zabbix server is lost. In this post I will show it happening, using packet capture, or packet analysis.
Zabbix setup and capturing Zabbix proxy traffic
This is the setup in this demo:
One Zabbix server in the central site (IPv6 address 2001:db8:1234::bebe and DNS name zabbixtest.lein.io)
One Zabbix proxy “Proxy-1” in a remote site (IPv6 address 2001:db8:9876::fafa and IPv4 address 10.0.41.65)
One Zabbix agent “Testhost” on a server in the remote site, sending data via the proxy
For simplicity, the agent only monitors one item: the system uptime (item key system.uptime using Zabbix active agent), with 20 seconds interval. So that’s the data that we are expecting to arrive to the server, every 20 seconds.
The proxy is an active proxy using SQLite database, with these non-default configurations in the configuration file:
The proxy “Proxy-1” has also been added in Zabbix server using the frontend.
I’m using Zabbix server and proxy version 6.4.0beta5 here. Agents are normally compatible with newer servers and proxies, so I happened to use an existing agent that was version 4.0.44.
With this setup successfully running, I started packet capture on the Zabbix server, capturing only packets for the proxy communication:
After having it running for a couple of minutes, I introduced a “network outage” by dropping the packets from the proxy in the server:
sudo ip6tables -A INPUT -s 2001:db8:9876::fafa -j DROP
I kept that drop rule in use for a few minutes and then deleted it with a suitable ip6tables command (sudo ip6tables -D INPUT 1 in this case), and stopped the capture some time after that.
Analyzing the captured Zabbix traffic with Wireshark
I downloaded the capture file (proxybuffer.pcap) to my workstation where I already had Wireshark installed. I also had the Zabbix dissector for Wireshark installed. Without this specific dissector the Zabbix packet contents are just unreadable binary data because the proxy communication is compressed since Zabbix version 4.0.
You can download the same capture file here if you want to follow along:
After opening the capture file in Wireshark I first entered zabbix in the display filter, expanded the Zabbix fields in the protocol tree a bit, and this is what I got:
Since this is an active proxy communicating with the server, there is always first a packet from the proxy (config request or data to be sent) and then the response from the server.
Let’s look at the packets from the proxy only. We get that by adding the proxy source IP address in the filter (by typing it to the field as an ipv6.src filter, or by dragging the IP address from the Source column to the display filter like I did):
Basically there are two types of packets shown:
Proxy data
Request proxy config
The configuration requests are easier to explain: in Zabbix proxy 6.4 there is a configuration parameter ProxyConfigFrequency (in earlier Zabbix versions the same was called ConfigFrequency):
It defaults to 10 seconds. What basically happens in each config request is that the proxy says “my current configuration revision is 1234”, and then the server responds to that.
Note: The configuration request concept has been changed in Zabbix 6.4 to use incremental configurations when possible, so the proxy is allowed to get the updated configuration much faster compared to earlier default of 3600 seconds or one hour in Zabbix 6.2 and earlier. See What’s new in Zabbix 6.4.0 for more information.
The other packet type shown above is the proxy data packet. It is actually also used for other than data. In proxy configuration there is a parameter DataSenderFrequency:
The default value for it is one second. But as mentioned in the quote above, even if you increase the configuration value (= actually decrease the frequency… but it is what it is), the proxy will connect to the server every second anyway.
Note: There is a feature request ZBXNEXT-4998 about making the task update interval configurable. Vote and watch that issue if you are interested in that for example for battery-powered Zabbix use cases.
The first packet shown above is (JSON reformatted for better readability):
There is no “data” in the packet, that’s just the proxy basically saying “hey I’m still here!” to the server so that the server has an opportunity to talk back to the proxy if it has something to say, like a remote command to run on the proxy or on any hosts monitored by the proxy.
As mentioned earlier, the test setup consisted of only one collected item, and that is being collected every 20 seconds, so it is natural that not all data packets contain monitoring data.
I’m further filtering the packets to show only the proxy data packets by adding zabbix.proxy.data in the display filter (by dragging the “Proxy Data: True” field to the filter):
(Yes yes, the topic of this post is data buffering in Zabbix proxy, and we are getting there soon)
Now, there is about 20 seconds worth of packets shown, so we should have one actual data packet there, and there it is, the packet number 176: it is about 50 bytes larger than other packets so there must be something. Here is the Data field contents of that packet:
In addition to the earlier fields there is now a list called history data containing one object. That object has fields like itemid and value. The itemid field has the actual item ID for the monitored item, it can be seen in the URL address in the browser when editing the item in Zabbix frontend. The value 1686 is the actual value of the monitored item (the system uptime in seconds, the host was rebooted about 28 minutes ago).
Let’s develop the display filter even more. Now that we are quite confident that packets that have TCP length of about 136-138 bytes are just the empty data packets without item data, we can get the interesting data packets by adding tcp.len > 140 in the display filter:
When looking at the packet timestamps there is the 20-second interval observed until about 17:08:30. Then there is about 3.5 minutes gap, next send at 17:11:53, and then the data was flowing again with the 20-second interval. The 3.5 minutes gap corresponds to the network outage that was manually caused in the test. The data packet immediately after the outage is larger than others, so let’s see that:
What we see here is that there are several history data objects in the same data packet from the proxy. The itemid field is still the same as earlier (44592), and the value field is increasing in 20-second steps. Also the timestamps (clock and nanoseconds) are increasing correspondingly, so we see when the values were actually collected, even though they were sent to the server only a few minutes later, having been buffered by the proxy.
That is also confirmed by looking at the Latest data graph in Zabbix frontend for that item during the time of the test:
There is a nice increasing graph with no gaps or jagged edges.
By the way, this is how the outage looked like in the Zabbix proxy log (/var/log/zabbix/zabbix_proxy.log on the proxy):
738:20230108:170835.557 Unable to connect to [zabbixtest.lein.io]:10051 [cannot connect to [[zabbixtest.lein.io]:10051]: [4] Interrupted system call]
738:20230108:170835.558 Will try to reconnect every 120 second(s)
748:20230108:170835.970 Unable to connect to [zabbixtest.lein.io]:10051 [cannot connect to [[zabbixtest.lein.io]:10051]: [4] Interrupted system call]
748:20230108:170835.970 Will try to reconnect every 1 second(s)
748:20230108:170939.993 Still unable to connect...
748:20230108:171040.015 Still unable to connect...
738:20230108:171043.561 Still unable to connect...
748:20230108:171140.068 Still unable to connect...
748:20230108:171147.105 Connection restored.
738:20230108:171243.563 Connection restored.
The log looks confusing at first because it shows the messages twice. Also, the second “Connection restored” message arrived almost one minute after the data sending was already restored, as proved in the packet list earlier. The explanation is (as far as I understand it) that the configuration syncer and data sender are separate processes in the proxy, as described in https://www.zabbix.com/documentation/devel/en/manual/concepts/proxy#proxy-process-types. When looking at the packets we see that at 17:12:43 (when the second “Connection restored” message arrived) the proxy sent a proxy config request to the server, so apparently the data sender tries to reconnect every second (to facilitate fast recovery for monitoring data), while the config syncer only tries every two minutes (based on the “Will try to reconnect every 120 second(s)” message, and that corresponds to the outage start time 17:08:35 plus 2 x 2 minutes, plus some extra seconds, presumably because of TCP timeouts).
There were no messages on the Zabbix server log (/var/log/zabbix/zabbix_server.log) for this outage as the outage did not happen in the middle of the TCP session and the proxy was in active mode (= connections are always initiated by the proxy, not by the server), so there was nothing special to log in the Zabbix server process log.
Configurations for the proxy data buffering
In the configuration file for Zabbix proxy 6.4 there are two configuration parameters that control the buffering: ProxyLocalBuffer
The ProxyOfflineBuffer parameter is the important one. If you need to tolerate longer outages than one hour between the proxy and the Zabbix server (and you have enough disk storage on the proxy), you can increase the value. There is no separate filename or path to configure because proxy uses the dedicated database (configured when installed the proxy) for storing the buffered data.
The ProxyLocalBuffer parameter is uninteresting for most (and disabled by default) because that’s only useful if you plan to fetch the collected data directly from the proxy database into some other external application, and you need to have some flexibility for scheduling the data retrievals from the database.
This post was originally published on the author’s blog.
Coolest Projects is an online showcase celebrating all young people who create with digital technology. From today, Monday 6 February, young people can register their projects on the Coolest Projects website. Registered projects will be part of the online showcase gallery, for people all over the world to see.
By entering your digital tech creations into Coolest Projects, you’ll have the chance to get personalised feedback about your project, represent your country in the online showcase, and get fun, limited-edition swag. Your project could even be selected as a favourite by our very special VIP judges.
What you need to know about Coolest Projects
Coolest Projects is an online celebration of young digital tech creators worldwide, their skills, and their wonderful creative ideas. We welcome all kinds of projects, from big to small, beginner to advanced, and work in progress to completed creation.
Here’s what you need to know:
Coolest Projects is all online and completely free
All digital technology projects are welcome, from very first projects to advanced builds, and they don’t have to be complete
Young creators up to age 18 from anywhere in the world can take part individually or in teams of up to five friends
Projects can be registered in one of six categories: Scratch, games, web, mobile apps, hardware, and advanced programming
Registration is now open and closes on 26 April 2023
All creators, mentors, volunteers, teachers, parents, and supporters are invited to the special celebration livestream on 6 June 2023
There are loads more announcements to come, so make sure to subscribe to the Coolest Projects newsletter to be the first to find out about this year’s VIP judges, limited-edition digital swag, and much more.
By continuing to use the site, you agree to the use of cookies. more information
The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.