How to use external data with CACTI - cacti

I am using some perl and bash scripts to create rrd files for some other application. My simple query is, can I use cacti to make graphs using that rrd files.
Note: I am able to create graphs using rrd tool.

Go throuth the manual of CACTI.

I found a guide on cacti manual on http://docs.cacti.net/manual:087:8_rrdtool.05_external_rrds

I suggest you can do something like this:
Create "Data Input Methods" and create some "Input Fields" as you requirement, because you have .pl or .sh scripts
Create Data Templates and other Templates
Add devices and create graphs relation to the devices

Related

release postgresql extension

I'm developing application that holds data in postgres. So i must prepare database before working with application, there must be created few tables. I'm creating this tables by running sql code but i think it's not convenient after i found this doc:
A useful extension to PostgreSQL typically includes multiple SQL
objects; for example, a new data type will require new functions, new
operators, and probably new index operator classes. It is helpful to
collect all these objects into a single package to simplify database
management
The main advantage of using an extension, rather than just running the
SQL script to load a bunch of "loose" objects into your database, is
that PostgreSQL will then understand that the objects of the extension
go together
I believe that i must use this approach
What i don't understand is that how can i share my extension. I thought that it works like maven, you create your extension with custom types, functions, tables and than you can pack it, name it (eg my-ext-0.1), give a version and release into some kind of a repository. After that you can connect to a database, run sql 'create extension my-ext-0.1' and have everything done :)
I thought that 'create extension' command will download extension and install it without downloading this by hands. I use maven, ivy and i expected similar behaviour from postgresql.
Documentation says that you need to place your extension files under some directory and only than run 'create extension' under some database.
How do you create your extensions and share them between different servers?
Postgres extensions do not work like this. They can have access to database internals and can run any code as database OS user. Therefore installing them is typically limited only to superusers, from a specific directory and only some of them are available on managed hosting servers.
I though that you can achieve something similar with installing your supplemental functions, types and tables in a special schema which is added to a search path. Upgrade would then be as simple as:
drop schema mylib cascade; -- don't do this!!!
create schema mylib;
\i mylib.sql
But unfortunately this would also remove all dependent objects from other schemas - columns using a custom type, triggers using a custom function etc. So it's not a solution for your problem.
I'd rather create my functions, types and all in my schema, using available extensions and "standard" languages.
Postgres will not download your extension (unless you create extension that will add this functionality to postgres). But your extension should be still created "usual" way.
to check your "directory for extension", run:
t=# create extension "where should I put control file";
ERROR: could not open extension control file "/usr/local/share/postgresql/extension/where should I put control file.control": No such file or directory
And repeating comment, before extending SQL, please check out plpgsql and existing commands.
When you get bored and make sure existing postgres functionality is too limited, install postgres-contrib package and check other extensions as best practices. And of course check out https://pgxn.org/

How to create pdf Template with the dynamic values

I am stuck in this task from a month ago so my last option is to post my query on stack-overflow.
I have to find a PDF Creation tool where i can crate my PDF Template and also i can assign a data source like sql server or any thing else. by which the sql server dynamic data can replace the value of pdf template Tags.'
I have tried many tools like Foxit and bulzip . But any of the tool does not meets my requirement. I must say I have completely stuck in this Task.
So Please give me appropriate solution . Immediate response will be appreciated.
If you want to create pdf in client side, you can try jspdf
If you are using php for server side, you can try mpdf.
Have a look at wkhtmltopdf. It's a very simple console utility that creates PDF from HTML. So basically you need to generate HTML markup. You can use some scripting language (PHP, python, etc.) or templating engine, depending on what exactly you want and what tools you are familiar with.
Create HTML/CSS markup for your template.
Define places where you want to put dynamic data, mark it
somehow.
Create script that will query database for your data and then
Either use search&replace in your script to place real data, or
copy whole HTML as a template using some templating engine (for
instance, PHP is itself a template engine, so you can basically
place save template as PHP file where real data is placed where
needed).

Best practice to insert 20 tables from sql file to YII project to create models

I just try yii last version.
In doctrine the models generated easly by shell comand, I want to do the same with yii.
Edit:
maybe its something like?:
yiic migrate create *
Thanks in advance
Start gii, go to the Model Generator and type '*' in the table name.
Yii provides a graphical too called Gii to auto generate models, CRUD functionality, controllers and many other things.
You don't need to care about SQL code, just import all your tables in database using PHPMyAdmin or whatever tool you use. then configure the database settings in /protected/config/main.php. sample code is provided in same file.
Then enable Gii tool with these guidlines Automated code generation
then start with creating models. type in name of your table click preview and then generate, your are done.

Options for generating create scripts for all objects in Oracle schema

I have several schemas in Oracle that must be promoted through dev, test, staging and production environments.
I need a command line tool that can take a script based snapshot of the dev environment (generate create scripts for a schema and all of its child objects which include OWB mappings and workflows).
What options exist that can be triggered from the command line and will generate create scripts suitable for inclusion in a source control system? The command line functionality is significant because the process will be triggered by a CI server (TeamCity).
Check out the in-built DBMS_METADATA package.
Lots of examples of usage on stackoverflow (or just google)
While much of the table structures etc can be mapped across using a variety of tools - your OWB mappings cannot be simply copied into a new environment - they must be properly deployed using either the OWB GUI or an OMB+ script to a new environment in order to have them properly registered into the runtime repository. And how you do that will depend on how you have the repositories configured.
I had posted an OMB+ script to deploy to a clean environment on the Oracle message boards a couple of years back. OWB has progressed a version or two since - but it might provide you with a starting point for that aspect of things.
Use expdp to dump the schema, and impdp with the SQLFILE option to generate a file of SQL commands to re-create the objects.

Creating database (not populating it) through Ant build file

I've managed to do some ant-script to populate my databases.. (simple script that runs some .sql files, like 'create', 'populate', 'drop', etc.)
Is there any way in hell that an ant-script can create the database itself from scratch? This is for JavaDB-Derby (from the glassfish bundle). Since it's a project for university, we find that we recreate the database on different machines all the time, and I would like to avoid this. Also it'd be great to know.
Normally I would create a database through Netbeans, and it would ask for a name, location, username, and then it would create the link derby:jdbc://localhost:1527//DBUsername/
I understand this is probably a bit too db-related, but since ant seems like a good tool maybe it could help.. or if not, maybe some other way (maybe another .sql file?)
Thanks for any replies.
Apache Derby's JDBC driver lets you create a database using ;create=true flag in the connection string:
jdbc:derby:MyDatabase;create=true
You can do this from Ant by running ij tool as command-line (or as java app). Here's a link to documentation
I've created databases via Ant. I don't recall having a problem executing DDL with the SQL task. You might want to check out DBUnit.