Zabbix and HP OpenView integration - zabbix

Did someone ever set up Zabbix to work with HP OpenView ?
Zabbix docs doesn't mention much information on that.
I know I have to create a media linked to a script.
In that script I have to use the opcmsg command but I don't understand the part which involves the database.
Can someone who ever experienced it drives me to the solution ?
Regards

You are missing media script doc. Parse input in your media script and process it with 'opcmsg'.
Try to find similar alert scripts (concept, not code) for your inspiration - https://www.zabbix.com/documentation/3.0/manual/config/notifications/media/script
And finally please publish your script with documentation (I recommend Github + Zabbix share).

Finally we have decided to create a media script which is writing output to a file.
Then that file will be monitored by a HP OpenView agent.
The steps are the following:
Create media script which is referencing your script :
In my case the script is named hpov.sh
The location of your script has to be referenced in your server config file (zabbix_server.conf) this way : AlertScriptsPath=/path/to/zabbix/scripts
Create an action which will be triggered on problems. Specify the macro you want in the first tab. The condition you want in the second one (leave as default). And finally set the third tab "Operations" like that:
You are free to change Users who are concerned
As the documentation says, link that media script to a user of your choice
That's it !

Related

Moodle - where are URLs/links stored in database?

I'm exporting an old release 1.9.2 and importing to 3.0.2.
Each module has dozens of videos that I play via an URL/link, which points to my own .PHP program on the site (and that wraps a Camtasia video).
I found that in 3.0.2, the link opens on a separate page, unless I edit each link by going to "Appearance", then "Display" and setting it to "Embed".
So I would like to write a mySQL update script to automatically set this flag for all such links (I will add a where clause to my script name).
I checked database in PHP/MyAdmin, and didn't see any likely table names.
You should attempt to use the admin tools to update everything, go to your moodle installation's main URL.
Then go to the site administration. After /admin in the url, add /tool/replace and go there.
You can there enter what you want to find in the db, and replace it with another value. Just be carefull with this tool and make a backup before you begin.

how to add another environment in advanced template

I m using yii2 2.0-dev AdvancedTemplate and need to add another environment (API),
similar to the currently working Frontend, Backend.
I tried to copy the files and search trough the settings but there are still some errors
and I feel this is the wrong way to do it...
There should be automated/console way to do this... but I find nothing in the docs.
Any ideas ?
Just create folder API in /environments/[prod|dev|other] and call ./init command

Change focus of SQL Server Management Studio

Day # 2 of SQL -
I am trying to run a function that I made yesterday, but SMSS is looking at the "Master" database and not my "Metrics" database so it won't run - it says "Invalid Object Name".
I know this is a simple question, but I'm not even sure what the correct term is. Do I need to change my "scope"? My "focus"? My "active database"? Not sure how to look this up on Google.
Add the line USE Metrics before your function call.
You can also change the database by using the dropdown list on the toolbar in the top left of Management Studio.
And of course, you can also fully qualify your call like this:
SELECT Metrics.dbo.splitstringcomma()
Adding USE YourDatabaseName at the start of all your scripts is a good habit to get into. That's my own preference.
On the SQL Editor Toolbar you have the option to change the available database.
HolTestDB in this example is the current database
Read more from: http://msdn.microsoft.com/en-us/library/ms177264.aspx

Not able to make calls to mod_roster_odbc functions

I tried to use my own custom roster by integrating mod_roster_odbc. I changed the config file too (commented out mod_roster and make a new entry for mod_roster_odbc). After running with this setup, mod_roster_odbc module is getting started ( I put some logs to in start function, those I can see). But none of other function is not getting called as I alter presence or logged out/logged in.
Please help to identify where I am making the mistake.
I think I know the answer to this. many websites tell you to use mod_roster_odbc.erl to create your own rostering. I believe thats your problem. Many of the functions are merged into mod_roster.erl file itself. I dont think this is mentioned anywhere.
So what you need to do is in ejabberd.cfg enable mod_roster_odbc but dont remove the mod_roster.erl file with the odbc file. This file will take care.
Finally you need to create a rosterusers table (or something like it) so that ejabber can query for friend list. After these changes, just restart ejabber server and you should be good to go. hope this helps.

Create an aMember plugin to integrate with Interspire

I need to integrate aMember with Interspire. I need aMember to completely sync with Interspire. When users register for aMember, they are also placed in the Interspire database, and are placed in the right group so that we may restrict access.
I have searched for a plugin to do this, and haven't found anything. I have also tried to make the plugin myself, but I have found no basic samples of such a plugin. I looked on the Wiki but the info and examples there are not much help. I have also tried to look at other plugins for other systems, but sense those other systems are different from Interspire, the way they are handled is not exactly how you would handle integrating with Interspire, so I was wondering if there is something we can do to get this plugin made, Or some more examples to look at that better explain how to make the plugin myself.
I know this is an old question, however I have a solution I have used and it works. Just answering this in the event you never found the solution, or someone else stumbles upon this and needs an answer.
You don't need to create a plugin for aMember. Using cURL in PHP you can make 1 action perform 2 things at the same time.
You would need to modify the registration step. It has been a while since I looked in the amember code to tell you which php file to edit, ect and its different probably with different amember versions..
On your registration form you should have HTML code for the form, it's action URL should point you to the correct file. It would start something like:
<form action="registration.php" method="post" class="something">
rest of the code here...
So in that example, I would look at registration.php and it should then take the data the user entered and handle it. it probably checks if the users exists in your amember users, if not then it adds them. At that point, you know everything is good and if your amember is setup to then send the user to paypal, it may have code for starting the payment integration. Between those steps (after it added the user to your db and before it sends them off to go pay) add your own code. You could just add the php code right there to use curl and add them to interspire. My way, I would create a function and just add 1 line of code to this file to call that function.
AddToIEM(firstname,lastname,ip,email)
Then there is probably a functions.php file for amember. In that file, i would create a function to add take their info passed above and add them into your IEM.
Additionally, you could take the plugin amember has for Aweber integration and modify it to use Interspire.
This is just an idea outline, and not real working code. You will need to lookup curl and figure out how to use it to add them into your interspire.
You can do this pretty easily with the amember hook system. I actually will probably be doing this sometime soon. If I do, I'll try to post a snippet. In the meantime, just take a look at the signup hooks in amember.