|
Thanks guys. I found something on stackoverflow that did pretty much what I wanted in Python to and cleaned up the remainder with unix tools. I'm not great in python but it did the job in this case. Also thank you for the bash examples, they make a lot more sense to me and I'll see if I can go back and play with them after the fact to get better output. I should put the time in to learn Python properly But in this case it was five lines in Python so that was probably the right tool
|
# ? Sep 7, 2017 19:13 |
|
|
# ? Apr 24, 2024 22:09 |
|
Martytoof posted:I should put the time in to learn Python properly but but my GIL
|
# ? Sep 7, 2017 21:31 |
|
xzzy posted:Well that's programming in general. As business requirements change that nice simple script turns into a bowl of spaghetti. I mean, yes. But it's much harder to turn Python or Ruby into spaghetti if you start with those
|
# ? Sep 7, 2017 21:37 |
|
code:
|
# ? Sep 8, 2017 02:28 |
|
Methanar posted:
|
# ? Sep 8, 2017 05:26 |
|
I'm looking for a simple-ish, fast monitoring solution that Just Works ; to run from a Raspberry. Basically I'd like to be able to monitor my CentOS-running NAS, a MySQL server, maybe health check some website to check WAN connectivity, that sort of things. I don't mind installing agents if I have to (if the said agents are not too troublesome to setup on major distros like CentOS or Raspbian), but SNMP OIDs would be fine too I guess. This is just for some home monitoring so nothing critical. I'd like a clean, light interface with graphs. Does this exist?
|
# ? Sep 8, 2017 19:52 |
|
Furism posted:I'm looking for a simple-ish, fast monitoring solution that Just Works ; to run from a Raspberry. Basically I'd like to be able to monitor my CentOS-running NAS, a MySQL server, maybe health check some website to check WAN connectivity, that sort of things. I don't mind installing agents if I have to (if the said agents are not too troublesome to setup on major distros like CentOS or Raspbian), but SNMP OIDs would be fine too I guess. This is just for some home monitoring so nothing critical. I'd like a clean, light interface with graphs. Does this exist? I haven't found anything really easy like this that doesn't have some downside that I'm not happy with. I've been using Grafanta + telegraf + influxdb for awhile and I'm pretty happy, but it's not exactly simple and easy to set up.
|
# ? Sep 8, 2017 20:18 |
|
Shot in the dark: anyone heard of or encountered a issue with OSX 10.12 ssh'ing into a RHEL7 based system? Got a user who randomly "can't type" on a RHEL7 server. Like, they press spacebar once, get nothing. Press it again and they get a space. Or they're typing a string and input simply stops working for a few seconds. Or they paste a block of text and only part of it makes it across. It's pretty sporadic, it happens "for a while" then goes away "for a while." But it's fine if they do work on a RHEL6 based system. Description makes it sound like network problems but I've eliminated that as a possibility as much as possible. I was about to go down the "well we don't officially support workstations so you're SOL" but then another user piped in that this happens to them "rarely" on their macbook too. Some kind of weird input bug on a mac maybe? Incompatibility between the ssh client and sshd that decides to throw away characters sometimes? I spent some time in the google machine and couldn't come up with something but it seems like such a subtle issue, maybe it just hasn't got anyone's attention yet.
|
# ? Sep 8, 2017 21:33 |
|
xzzy posted:Shot in the dark: anyone heard of or encountered a issue with OSX 10.12 ssh'ing into a RHEL7 based system? I spend my whole day every day sshing to various RHEL5/6/7 boxes from macOS Sierra and there is no input bug I've ever run into.
|
# ? Sep 8, 2017 21:49 |
|
Have they checked $TERM? The rhel6 system may have a .bash_profile which sets it to a correct value instead of whatever they're getting now
|
# ? Sep 8, 2017 21:51 |
|
Working on playing with $TERM right now. But I don't have a macbook so it's the blind leading the blind here.
|
# ? Sep 8, 2017 21:52 |
|
Well, playing with $TERM at least found a workaround. Turns out the user was doing a macbook -> random linux server -> RHEL7 box. They were running a tmux session on the middle hop, and when doing so tmux sets $TERM to 'screen'. Then when they log into a RHEL7 system from inside tmux, response is garbage. When on a RHEL6 box it's fine. After forcing their terminal to xterm on the RHEL7 box, everything was fine. Clearly some kind of library conflict somewhere in the chain but I can't reproduce it on any of my machines so I suppose the investigation ends there.
|
# ? Sep 8, 2017 22:45 |
|
Furism posted:I'm looking for a simple-ish, fast monitoring solution that Just Works ; to run from a Raspberry. Basically I'd like to be able to monitor my CentOS-running NAS, a MySQL server, maybe health check some website to check WAN connectivity, that sort of things. I don't mind installing agents if I have to (if the said agents are not too troublesome to setup on major distros like CentOS or Raspbian), but SNMP OIDs would be fine too I guess. This is just for some home monitoring so nothing critical. I'd like a clean, light interface with graphs. Does this exist? This is a shot in the dark since the solution is available since before the dinosaurs walked the earth (so you probably tried it already), but what is wrong with MRTG for your needs? Worst case scenario ... nagios? It has a bazillion agents, but i personally never tried it. At home I just MRTG and is .... fine. Old,. but fine. And adding scripts (that do whatever that spits out 2 numbers) for it is quite easy.
|
# ? Sep 9, 2017 01:28 |
|
Volguus posted:This is a shot in the dark since the solution is available since before the dinosaurs walked the earth (so you probably tried it already), but what is wrong with MRTG for your needs? Worst case scenario ... nagios? It has a bazillion agents, but i personally never tried it. At home I just MRTG and is .... fine. Old,. but fine. And adding scripts (that do whatever that spits out 2 numbers) for it is quite easy. Nagios seemed overkill and MRTG seemed ... yeah, old (I saw the fact that their demo page returns a 404 as a bad sign). I was hoping for something more modern, but if that fails I might just get fallback to MRTG. Thanks!
|
# ? Sep 9, 2017 08:02 |
|
Furism posted:I'm looking for a simple-ish, fast monitoring solution that Just Works ; to run from a Raspberry. Basically I'd like to be able to monitor my CentOS-running NAS, a MySQL server, maybe health check some website to check WAN connectivity, that sort of things. I don't mind installing agents if I have to (if the said agents are not too troublesome to setup on major distros like CentOS or Raspbian), but SNMP OIDs would be fine too I guess. This is just for some home monitoring so nothing critical. I'd like a clean, light interface with graphs. Does this exist? prometheus, prometheus-node-exporter, and grafana all work really good together for this. kind of overkill but a fun project. Prometheus node exporter by itself will expose all your system metrics on a webpage
|
# ? Sep 9, 2017 08:05 |
|
Roargasm posted:prometheus, prometheus-node-exporter, and grafana all work really good together for this. kind of overkill but a fun project. Prometheus node exporter by itself will expose all your system metrics on a webpage Grafana looks sweet as hell, I'm going to try that! Thanks mate.
|
# ? Sep 9, 2017 08:42 |
|
Could you give a brief rundown of how you set it up? Last time I tried I gave up. Tried on CentOS with influxdb and also the other main db solution. This was a while ago, though. It might be a slicker experience now. It does look very good once it's working.
|
# ? Sep 9, 2017 10:38 |
|
Furism posted:Grafana looks sweet as hell, I'm going to try that! Thanks mate. You fucker, i already told you to use grafana!
|
# ? Sep 9, 2017 15:21 |
|
Thermopyle posted:You fucker, i already told you to use grafana! Sorry, I overlooked the thread I think
|
# ? Sep 9, 2017 17:44 |
|
Roargasm posted:prometheus, prometheus-node-exporter, and grafana all work really good together for this. kind of overkill but a fun project. Prometheus node exporter by itself will expose all your system metrics on a webpage I did a collectd -> influxdb -> grafana setup that I've been really happy with. collectd is super easy to manage with config mgmt tools, and is handily available in most linuxes default repos... What sort of hotness does prometheus give? I've seen it brought up in multiple places, but it seemed... complicated?
|
# ? Sep 9, 2017 20:57 |
|
Edit: wrong thread
Hed fucked around with this message at 01:10 on Sep 10, 2017 |
# ? Sep 10, 2017 01:06 |
|
Edit: I am an idiot
|
# ? Sep 10, 2017 01:09 |
|
Furism posted:Grafana looks sweet as hell, I'm going to try that! Thanks mate. You still need something to actually poll and store the metrics. But yeah for visualizing things and making sweet dashboards, Grafana owns. And it can do alerting too as of a few versions ago.
|
# ? Sep 10, 2017 01:24 |
|
Docjowles posted:You still need something to actually poll and store the metrics. But yeah for visualizing things and making sweet dashboards, Grafana owns. And it can do alerting too as of a few versions ago. Yes and apparently that'd be Prometheus? For now I'm still setting up the Raspberry. Compiling Go on a Raspberry is not quick. Apparently now InfluxDb offers ARM binaries so I might not even have to compile it myself, but I have to figure out the right way to manually extract the files where they must go because there's no ARM .deb package (just the binaries and files you have to extract). I might just go "gently caress this" and simply install it on my CentOS NAS though.
|
# ? Sep 10, 2017 10:41 |
|
Why not just look at where an x86 deb puts the files? Basically guaranteed to be the same
|
# ? Sep 10, 2017 12:09 |
|
Furism posted:Yes and apparently that'd be Prometheus? For now I'm still setting up the Raspberry. Compiling Go on a Raspberry is not quick. Apparently now InfluxDb offers ARM binaries so I might not even have to compile it myself, but I have to figure out the right way to manually extract the files where they must go because there's no ARM .deb package (just the binaries and files you have to extract). I found telegraf easier to understand and set up.
|
# ? Sep 10, 2017 16:08 |
|
I've always used collectd for the stats-gathering part. Though apparently the "TICK Stack" has been gathering steam. Telegraf is the T in TICK. I wouldn't really describe collectd as easy to understand or setup myself, so I'm interested to hear more about telegraf.
|
# ? Sep 11, 2017 04:51 |
|
Thermopyle posted:I found telegraf easier to understand and set up. Yes I'll use that, mostly I'm struggling a little bit with the InfluxDB setup. Good tip to look into the x86 deb to replicate on ARM. Never looked before into how packages are built so that should be an interesting learning experience.
|
# ? Sep 11, 2017 09:39 |
|
Furism posted:Yes I'll use that, mostly I'm struggling a little bit with the InfluxDB setup.
|
# ? Sep 11, 2017 14:35 |
|
Docjowles posted:I've always used collectd for the stats-gathering part. Though apparently the "TICK Stack" has been gathering steam. Telegraf is the T in TICK. I wouldn't really describe collectd as easy to understand or setup myself, so I'm interested to hear more about telegraf. Not much to say about telegraf (though I say this as someone who already went through the process of getting it set up and everything always looks easier in hindsight). You basically just install it, edit its simple-to-understand-config to monitor the things you want, and then run it. The hardest part is when you're configuring it to monitor some service that you don't understand real well. In that case you don't always understand what you want to monitor.
|
# ? Sep 11, 2017 15:24 |
|
As sort of a holistic exercise in homelab management, I was thinking of setting up a SLURM cluster. To simplify (lol) hardware needs I'd like to PXE boot the nodes from an iSCSI served by my ZFS NAS. Ideally I'd like to have a base system image with each node getting its own "instance" with copy-on-write type behavior. My "story" for this behavior is something like:
My specific questions here are how to do that "re-acquire the node number" part and what is the most effective way to implement the versioning for the filesystem. If the PXE image is truly immutable then I could just serve a block image, the other way I could go would be to declare a ZFS dataset and have each node clone a snapshot. The advantage of the dataset path seems like a more "natural" filesystem (writeable), and in theory deduplication should be able to keep usage down to the actual shared fileset. I may also have problems with CoW on a block image. As for the node number... is there something I should be looking towards as a model, like how Docker swarms set themselves up or something? Usually there is not a "persistent" ID, but I'm not sure that having nodes come and go from underneath SLURM's workload scheduler is the best idea.
|
# ? Sep 11, 2017 18:51 |
|
Paul MaudDib posted:As sort of a holistic exercise in homelab management, I was thinking of setting up a SLURM cluster. To simplify (lol) hardware needs I'd like to PXE boot the nodes from an iSCSI served by my ZFS NAS. I'm not familiar with SLURM, but I've done something similar to this before. Anyway, I'm a big fan of using MAC addresses as machine identifiers. It's an easily accessible ID that you can do some fancy things with by scraping ARP tables, MAC address tables, tracing it to a physical switch port, etc. What exactly are you PXE booting to? A RO NFS root? A "live" installation held entirely in ram?
|
# ? Sep 11, 2017 19:30 |
|
Methanar posted:What exactly are you PXE booting to? A RO NFS root? A "live" installation held entirely in ram? I've never done PXE booting before so I'm fully open to suggestions as to the least painful way to implement this. NFS seems like it might be a decent idea, if all the backend nodes were pulling from a single RO filesystem then all I would have to do is update it and the changes would effectively propagate to the nodes. If the nodes could also get their node ID from a lookup based on the MAC address then the PXE image could be basically immutable.
|
# ? Sep 11, 2017 20:11 |
|
Paul MaudDib posted:I've never done PXE booting before so I'm fully open to suggestions as to the least painful way to implement this. NFS seems like it might be a decent idea, if all the backend nodes were pulling from a single RO filesystem then all I would have to do is update it and the changes would effectively propagate to the nodes. If the nodes could also get their node ID from a lookup based on the MAC address then the PXE image could be basically immutable. I've used both of your suggestions, truly immutable OS image and creating a ZFS clone for each node. I'd definitely recommend the immutable option if you have it available to you. Much easier to set up, fewer things to go wrong, and like you say, it's one change on the ZFS dataset to propagate changes. PXE boot through iSCSI or however you would like, but ultimately get your root file system mounted read only https://spin.atomicobject.com/2015/03/10/protecting-ubuntu-root-filesystem/. A gotcha is definitely make sure dhcpd on your PXE booted node doesn't do anything silly like a release/renew after 30 minutes of being online (or even as it comes up in the first place), cutting out the root filesystem beneath itself. That's something frustrating that's bit me before. Then have a little python script or something query a redis instance somewhere mapping MAC to node ID. Set that as an environment variable that you pass to your application.
|
# ? Sep 11, 2017 20:30 |
|
I'd use the motherboard UUID if available. If not, generate one with the MAC as a salt. Note that RO root support is pretty poo poo in 2017 unless you layer COW or a ramdisk on top of it, and you should expect a million little things to fail (because they're trying to write crap somewhere in /usr/share or whatever)
|
# ? Sep 11, 2017 22:05 |
|
evol262 posted:I'd use the motherboard UUID if available. If not, generate one with the MAC as a salt.
|
# ? Sep 12, 2017 02:03 |
|
What’s the good rhcsa book now?
|
# ? Sep 12, 2017 02:13 |
|
Vulture Culture posted:InfluxDB itself isn't terribly complicated, but there are a lot of really weird things the documentation sort of assumes you know about how it works. Where are you getting stuck? I'm not sure what the proper way to install it from the tar is. When I untar it I get /var, /usr, /etc directories created, each with subdirectories of its own and files in them. My assumption was that if I sudo untar into / then it should be fine? But I'm not sure because I don't know enough about Linux and the differences between distros (would Debian put/look for the files in the same directory as RHEL? If not, how do I know which distro this tar was made for?).
|
# ? Sep 12, 2017 08:19 |
|
Furism posted:I'm not sure what the proper way to install it from the tar is. When I untar it I get /var, /usr, /etc directories created, each with subdirectories of its own and files in them. My assumption was that if I sudo untar into / then it should be fine? But I'm not sure because I don't know enough about Linux and the differences between distros (would Debian put/look for the files in the same directory as RHEL? If not, how do I know which distro this tar was made for?).
|
# ? Sep 12, 2017 14:45 |
|
|
# ? Apr 24, 2024 22:09 |
|
Problem I had was that their packages were all for x86 and I'm using a Raspberry so needed the ARM architecture. However after spending about 2 hours compiling go (to then compile InfluxDB) I thought I'd apt-cache search and guess what? There is a package in the main Raspbian repos! So now it's all good.
|
# ? Sep 12, 2017 14:53 |