January 12th, 2009, by mlambie
I like to have wider images in Cacti, the system we use to monitor our servers.
Specifically, I like to have images that are 750px wide instead of the default 500px. It can be cumbersome to change the templates individually, so the following SQL can be executed against your Cacti database and they’ll all be changed at once:
UPDATE graph_templates_graph SET width = 750 WHERE ID > 0;
I’ve found that some templates can’t jam all their information into a 500px wide image, so this SQL fixes that. It’s annoying having to reverse-engineer the database every time I add a new device template but now I have this post to refer back to.
We are a web development company and this is our blog. We specialize in building web applications with the Ruby on Rails framework. You can read more about our Ruby on Rails development or contact us.
Tags: cacti, mysql, SQL
Posted in Tips and Tricks | No Comments »
December 18th, 2008, by mlambie
I’m doing some modifications to a Copper installation for a customer that involved the addition of some new fields to their project table, namely CashContribution and InKind. They both track different donation types that can be made against a project.
I needed a quick way to populate some projects with dummy, random data, and here’s what I ended up with:
UPDATE Projects
SET CashContribution = (SELECT CONVERT(RAND() * 1000, UNSIGNED))
WHERE ID > 600;
This meant that I wasn’t looking at row-after-row of the same dummy data, and that the test system better represents the intended real-world use.
We are a web development company and this is our blog. We specialize in building web applications with the Ruby on Rails framework. You can read more about our Ruby on Rails development or contact us.
Tags: mysql, random, typecast
Posted in Inside TFG | No Comments »
Follow Us