|[0:00:00]||Welcome to the Checkmk Channel. Today I'll be talking about monitoring an Oracle database with Checkmk.|
|[0:00:15]||In this tutorial I will show you how to set up the Oracle monitoring with the Agent Bakery and we will also have a look at the command line, wherein I will show you how to run the agent plugin manually, look at the different command line options that it offers and also look at the configuration file. So without further Ado let's get started.|
|[0:00:32]||As a first step we will create a user in the Oracle database which will be used for monitoring to create that user we can directly go to our Oracle documentation where we can find this information in the chapter number two and here we have "Create a user".|
|[0:00:57]||For this demo I'm using a multi-tenant database and in order to create a user for that I will have a look here under multi-tenant databases.|
|Here there are some commands that I need to execute against my Oracle database so let's copy these commands. And now go to the Oracle database let's copy this replace it with a password where I'm keeping the password as Secret.|
|[0:01:33]||And then we can copy the other commands which says "alter user c##checkmk set container_data=all". And then do some execute some Grant statements which is going to assign a select catalog role to this user and also a "select create session privilege" to this user. And after that we can just do a simple exit.|
|[0:02:13]||So we have created the user successfully, now we can go to the monitoring web UI in order to do the monitoring configuration for the Oracle database.|
|[0:02:24]||As a first step we will be creating a host which we will be using for monitoring. So let's click on: Add host to monitoring. Define the hostname, Define the IP address and rest the data source which is selected as API integration if configured else Checkmk agent no SNMP can remain as it is. We can just simply save and go to folder, after that we can click on setup search for Oracle. Under agent rules you can select Oracle databases.|
|[0:02:58]||Click here click on "Add rule". Click on "Activation" because we want to deploy the Oracle database agent plugin click on host if you are using xinetd then select xinetd in my case I'm using systemd. So I will select this from the drop-down my interval will remain as one minute. This is primarily required for running asynchronous sections which we will also have a look later when I show you the configuration files.|
|[0:03:40]||Then I will choose my login credentials, choose the authentication method. Define my user that I created my user was c##checkmk and the password was Secret.|
|[0:03:53]||The role was a normal connection but you could also select these different roles from the drop down, click on host name since I'm deploying this agent plugin and configuration on my Oracle database so it can stay as localhost but if it's a different name hostname or IP then you need to Define it here. Click on the TCP port for listener my default Port is 1521 so I will keep it as it is.|
|[0:04:24]||If you want to define a TNS alias you could also define it here I will leave this field as blank. If you have multiple databases and you want to define the authentication credentials for those SIDs that you could also define it here in my case I just have one single database so I will leave it as it is.|
|[0:04:51]||But otherwise you could keep on adding new elements and define the different authentication credentials for your different SIDs. Next option is login for ASM if you have ASM enabled on your database then you could also define the credentials here it's the same settings where you define an authentication method, you define a role hostname TCP port and TNS alias.|
|[0:05:22]||Next setting is instances to monitor where you can select if you would like to monitor all your interfaces only query the following SIDs or skip some of the SIDs that are found. In my case I'll just select monitor all instances found. You could also add a pre or post fix to your TNS aliases here. since I don't need the setting I will just skip it and then the interesting setting is "Sections", what are the sections that you would like to fetch or from your agent plugin.|
|[0:06:02]||You can see that some sections are configured to run synchronously and some are set to be "Run asynchronously and cached", this setting can also be altered by selecting the right option some sections can be disabled.|
|[0:06:17]||If you would like to disable it for a particular SID then you could also exclude some sections on certain instances like, define the name of the SID and then choose which sections should be excluded for that particular SID. I will go with the default settings so I won't select any sections if you don't select any options then the sections which are supposed to be run synchronously and asynchronously are configured by default which we will also look in the CFG file which gets generated from this rule. Next option is the cache age for background checks the mk_oracle plugin or the agent plugin, it has its own caching mechanism the default is 600 seconds that's 10 minutes.|
|[0:07:13]||And this cache age can also be changed but if you provide a different number here. I will keep the default values so we'll not select anything. Sqlnet send timeout is another setting with which you can select a timeout, it's selected as 30 seconds since I don't need it I will also skip it. Okay the next two settings that is Remote instances and ORACLE_HOME to use for remote access, this is primarily required when you want to monitor Oracle database without installing the agent plugin on it.|
|[0:07:54]||And this is something that we will cover in the next tutorial. And last but not the least is the TNS_ADMIN, this is basically the path that you will define where you place your sqlnet.ora and tnsnames.ora. If you leave this field blank then it will by default /etc/check_mk. So we are done with the configuration and now I'm going to assign this to the host that I created and I will click on Save.|
|[0:08:32]||After that, before we activate the change we could also go to setup press Windows, Linux click on bake agents. And once our agent is baked we can then activate the change. Go to setup again Windows Linux and then download the package that we installed. In my case my Oracle database server is running on a red hat server so I'll download an RPM package.|
|[0:09:12]||And we will now copy this package to our Oracle server. So let's quickly go to the command line. And look for the file.|
|[0:09:30]||That's the file we will now copy this over to our Oracle server. All right we can now have a look at our SQL server. Switch here. So this is the file that we just now copied over, let's copy this name and install the package.|
|[0:10:05]||As you can see the package has been installed, let's have a look into the /etc/check_mk folder where our configuration files are placed. As you can see we now have an mk_oracle.cfg file. If we look at the folder /uer/lib/check_mk_agent/plugins/.|
|We now have the folder 60 which you might have noticed when we selected the systemd. The interval was set to 60 seconds so this is gonna help the long running queries and the asynchronous checks to be executed successfully. If we look under the folder 60 this is where our plugin is available. Now to run the plugin we can just copy this path go to this and after that we can just simply export some environment variables which will be required by the plugin.|
|[0:11:13]||This is a MK_CONFDIR = /etc/check_mk/. The other one is, MK_VARDIR, which basically contains the cache information from this uh from this plugin and that's it. And now we can run the plugin.|
|[0:11:49]||First of all we can run the plugin with the '-t' option this will be like a connection test if we run it we will see the information directly displayed on the console. As an initial output there will be empty sections and after that it will show you depending on how many instances you have configured it will show you the login information. Here it shows that the operating system is Linux 'ORACLE_HOME' that was detected from the ORA tab.|
|[0:12:24]||What is the login check to this instance, the version, the user information, sync sections and the async sections. So when I talked about those sections that we can select synchronously and asynchronously I was talking about this configuration and you can also have a look at the /etc/check_mk/mk_oracle.cfg or we can also open the file.|
|[0:12:54]||Here as you can see that this file was created by the checkmk agent bakery, under connection and authentication we see the DBUSER wherein we have our user the password ,the role is blank, it's a normal connection, this is the host name, this is the port, and last is the value for the version.|
|[0:13:16]||Then you have a default setting for ASMUSER. Since we are not using it so this can stay as it is. Then comes the sync sections and the async sections. So, sync sections are the ones which run in foreground and wait for the result. These are the sections which you can see are run synchronously.|
|[0:13:39]||And then there are async sections which where basically the queries can take a longer time so these sections are run in the background and they run at a slower interval and then at the bottom we have something about ASM and async. Since we're not using it we can ignore it and then we have something about the background the cache age which we set up as 600 seconds for the async sections.|
|[0:14:07]||All right let's go out of this configuration file. We already performed the connection test and it was successful. Now we can straight away remove this and we can also have a look at what are the other different command line options available with the mk_oracle plugin. If we just type 'mk_oracle --help' we can have a look at all the options.|
|[0:14:34]||Here you have a '-t' with which you can enable the full bash debugging, you can check the connection like I did the connection test, you can also call this plugin with the '-l' option which basically stores the results in a log file. You can also call a corresponding section or you could also perform an 'oratestversion'.|
|[0:14:59]||And here it also talks about different sections that are available under the configuration, sync sections async sections, information about the ASM, the cache age, if you are only interested in specific SIDs that you could also directly specify inside this file, but please make sure that you have set it up by the bakery, so if automatic agent update is configured then these changes will be overwritten.|
|[0:15:30]||Like this there are settings for the remote instances which will be configuring in the next tutorials and then there is information about how you could call Custom SQL queries this will also be covered in the next tutorials. And all the other settings are related to the custom SQLs. So now we can just execute the plugin without any special option. If we run this plugin we will see first of all it displays some empty sections, if you want to look at the output and let's see what information we get.|
|[0:16:14]||When you run the agent plugin for the first time you will see some empty sections in the beginning which is perfectly fine and after that you will see some information being populated against different sections. As you can see we get information about Oracle instances, the Oracle performance metrics and we can also just look for this string Oracle system parameters Oracle processes, what are the sessions, long active sessions, logswitches, undostat, what is the recovery status, information about the Oracle logs tablespaces, in some of the sections you also see the word "cached" this is basically your asynchronous checks.|
|[0:16:55]||If you remember we we had two sections "sync_sections ", "async_sections". And the Oracle table spaces is part of the async sections and this is why these results are cached.|
|[0:17:13]||Then you have the Oracle jobs and then it's finished after Oracle resumes. We can also have a look at the cache file, it will be generated under '/var/check_mk_agent/cache/' folder. There will be two files that will be generated when you use systemd because you run the plugin with the 60 Minutes of interval and on top of that you also run some async sections. So if we look at this file "plugins_mk_oracle.cache" you will see the complete information about all the sections, but if you look at this particular file which is "oracle_proddb.cache".|
|[0:18:08]||You will see only information about the async sections. Alright so now we can go back to the monitoring UI and perform the service discovery. All right let's click on the Oracle host. All right here it shows that communication has failed this is because I have not registered the agent against this monitoring instance. So let's go back to the command line and do the registration.|
|[0:18:47]||It should be done by the 'cmk-agent-ctl' command, let's register the host it will be the oracle-host with the with the server that is going to be my 10.203.8 which will be my demo instance, this will be the mysite the user and we will fill out the password when it asks for it. So if you just press enter you have to establish the connection, you simply press yes and then type the password.|
|[0:19:28]||And after that you will see the screen, if you just now type cmk-agent-ctl status, you will see now the agent has been registered against this monitoring server on Port 8002 and the site is demo. So now let's go back to the monitoring web UI and perform the discovery.|
|[0:19:53]||So if we now reschedule this check you will see it will now try to get some information about the services that it found. It already found 68 unmonitored Services which is a mix of your basic Linux metrics and also the Oracle checks that are provided by the mk_oracle agent plugin.|
|[0:20:18]||Click on host, click on service configuration, we can already see this information here under the undecided services. In the beginning you will definitely see your basic Linux metrics like memory CPU, Filesystem, Mount points and then you will see information about your Oracle instances.|
|[0:20:45]||This is my CDB name and I get some parameters and on the right-hand side I also see which check plugin is responsible for creating this service check. This can also be activated by using show plugin names, you can also hide it if you don't want to see these different columns. And then we get all the other information about my Oracle database like jobs, get information about the sessions, the different performance metrics, information about my table space, and now we can accept all the changes. And last but not the least let's activate the change.|
|[0:21:33]||Let's give it some time or you can also just simply reschedule the check. So now you will see all your Oracle service checks available for your Oracle database which were created by the Oracle agent plugin.|
|[0:21:53]||So that was our tutorial about monitoring an Oracle database. Please like and subscribe and see you next time.|
Ep. 1: Installing Checkmk 2.0 and monitoring your first host
In this video, Baris explains how to take get started with Checkmk and start monitoring your first host within a few minutes.
Ep. 2: The Checkmk 2.0 user interface
In this video, Baris take you through the new user interface in Checkmk 2.0. He explains the various components of the User interface such as the new navigation menus, the Sidebar, main dashboard, tactical overview, how to switch between the Checkmk interface themes and much more
Ep. 3: Using SNMP to monitor network devices in Checkmk 2.0
In this episode, Baris explains how to monitor network devices with Checkmk. SNMP is a protocol that many switches, routers, printers, UPSs, hardware sensors and other devices have implemented with the purpose of being able to monitor them easily.
Ep. 4: Monitoring Windows in Checkmk
In this video of our Getting started with Checkmk series, Baris explains how to install a Checkmk agent on a Windows host system and add that into your monitoring environment.
Ep. 5: Using metrics and graphs in Checkmk 2.0
In the 5th episode of the Getting started with Checkmk series, Baris explains using various metrics that you can monitor in Checkmk such as CPU utilization, CPU load etc. You can also see graph visualizations for these metrics or create and customize your own as per your requirements.
Ep. 6: Updating Checkmk 2.0 and using multiple instances
In this video, Baris explains how to update your Checkmk instance. It is very easy and can be done within minutes. You can run multiple Checkmk instances with different versions on the same system. This gives you the flexibility to test the new version before using it in production.
Ep. 7 (part 1): Working with rules and setting thresholds in Checkmk
In the following three-part videos series, Baris explains rule-based monitoring with Checkmk. In the first part, he shows you how you can work with rules and set threshold values. Rule-based configuration is one of the key features for Checkmk which helps you to scale your monitoring easily within minutes.
Ep. 7 (part 2): Smart rules with Host Tags in Checkmk
In the second part of this video, Baris explains using Smart rules with host tags in Checkmk. In the first part, he shows you how you can work with rules and set threshold values. These are features that you can use to build your rules even more intelligently and to better organize your monitoring.
Ep. 7 (part 3): Managing Hosts in Folder in Checkmk
In this final part of our episode on Rule-based monitoring in Checkmk, Baris demonstrates how to manage hosts in folders in Checkmk. This helps you to apply your monitoring configurations at scale and organize your hosts according to your needs.
Ep. 8: Working with Host and Service Groups in Checkmk
In this Baris demonstrates how to create host and service groups in Checkmk, so you can perform actions on an entire group instead of configuring each of them individually.
Ep. 9: Using the Quicksearch function in Checkmk
In this episode of the Checkmk tutorials, Baris shows how you can use the Quicksearch function in Checkmk. You can use it to easily find and manage certain hosts or services. He also explains some examples of filters to you. In Checkmk 2.0 you can use the same syntax in the Seach function found in the monitor menu to get identical results.
Ep. 10: Detecting configuration errors with the Analyze Configuration feature
With the Analyze Configuration feature, you can check if there are any configuration errors in your installation. Checkmk controls a number of possible security risks or potential performance restrictions and indicates if there are any problems.
Ep. 11: View creation and customization in Checkmk
In this video, Baris demonstrates how to customize headers, columns, and more in Views in Checkmk for yourself or other users. He also explains how to create custom views and add desired information to these views.
Ep. 12: Acknowledging problems in Checkmk
In this video, Baris explains how you can acknowledge problems in Checkmk. This function helps you to qualify the states of hosts and services. This allows you to keep track of messages in the main dashboard and, for example, you can add comments to problems.
Ep. 13: Scheduling downtimes in Checkmk
In the episode of our Getting started with Checkmk series, Baris explains how you can manage the maintenance times of your systems in Checkmk. Such scheduled downtimes prevent your monitoring from sending false alarms when a host or service goes to WARN or CRIT during maintenance work. You can also inform the users concerned about the maintenance via Checkmk.
Ep. 14: Distributed monitoring with Checkmk
In this video, Baris explains how you can connect several Checkmk instances to a monitoring system and then manage it.
Ep. 15: MKPs and Plugins in Checkmk
In the 15th episode of our Getting started with Checkmk tutorial series, Baris explains what are Checkmk Extension Packages (MKPs) and how easy it is to integrate them into your Checkmk monitoring environment. MKPs are the preferred format when you make your own extensions as it makes it easy to share with other users or deploy in distributed environments.
Ep. 16: Working with 'Bulk Actions' in Checkmk
In this episode of our Checkmk tutorials series, Baris explains how you can save a lot of time with bulk actions. With this feature you can perform various tasks such as deleting, renaming, service discovery etc. on a large number of hosts simultaneously.
Ep. 17: Working with network topologies in Checkmk
In this video of our gettign startted with Checkmk series, Baris explains how to map network topologies in Checkmk. This feature is quite helpful to manage your network and prevent any unnecessary notifications from the devices in your network.
Ep. 18: Creating and customizing dashboards in Checkmk
In this video of our Getting started with Checkmk series, Mathias explains how you can create and customize dashboards in Checkmk 2.0, so you can get insights into your monitoring according to your requirements. Find out more in this video.
Ep. 19: Monitoring websites and their certificates with Checkmk
In this episode, Bastian demonstrates how to monitor a website and its certificate with Checkmk. You can also monitor specific web pages with Checkmk by using the several options that will suit your use case. Learn more in this video.
Ep. 20: Configuring dashboard elements in Checkmk
Learn how to add data visualization elements of the various metrics into your Checkmk Dashboard. In this video, Mathias explains how you can configure these elements and create a dashboard as per your requirements.
Ep. 21: Setting up notifications in Checkmk
Learn how to set up notifications in Checkmk and assign relevant contacts and contact groups to be notified for various events. Later in this video, our presenter Bastian also demonstrates how you can set up rule-based notifications according to different conditions for hosts and services.
Ep. 22: Monitoring logfiles with Checkmk
Monitor your logfiles with Checkmk using its Logwatch plugin. It is very useful when you want to monitor your logfiles regardless of whether you are using a UNIX/Linux or a windows based system. Learn more in this video.
Ep. 24: 3 Rules for efficient network monitoring
In this video, Bastian demonstrates 3 rules that will help you to efficiently monitor your network interfaces. With Checkmk 2.0, with just three rules, you can set up an efficient network monitoring that will not only monitor all of your network interfaces but also simultaneously provide a detailed overview of all of your ports.
Ep. 25: New UX and security improvements in Checkmk 2.1
Checkmk 2.1 come with many UX improvements such as pre-built dashboards for Linux and Windows, faster core performance and much more. Security features such as two-factor authentication etc. were also added in this new version. Watch this video to learn how to use these new features and enhancements in Checkmk.
Ep. 28: Working with InfluxDB integration in Checkmk
Learn how to send data to InfluxDB from Checkmk. As InfluxDB introduced a new protocol to send data to it, a new connector was developed with Checkmk to talk natively with it. Learn more about it in this video.
Ep. 29: New agent architecture in Checkmk 2.1
With Checkmk 2.1, the agent architecture was modified to enable performance improvements and add new features such as TLS encryption, data compression, and the reversal of direction of communication from the agent. This will enable push mode and pull mode.
Ep. 30: Clustering the Checkmk appliance
In this video, Robin demonstrates how you can cluster your Checkmk appliance to make it resilient against hardware failures. If you are using the Checkmk hardware appliance, it may be helpful to cluster your appliance to maintain high availability.
Ep. 32: Working with the Agent bakery in Checkmk
In this video, Robin demonstrates how to roll out agent packages with the required configuration for different monitored systems using the agent bakery in Checkmk. The "Automatic agent update" is quite a helpful feature as it pulls the latest configurations for an agent automatically and you don't need to manually update all of your agents deployed on different systems.
Ep 33: Monitoring Docker containers with Checkmk
Learn how to monitor Docker containers with Checkmk.In this video, Robin demonstrates the process of setting up a rule to configure the docker plugin and bake an agent with the desired settings for the Docker host.
Ep 34: Introduction to Checkmk Ansible collection
Last year the Checkmk Ansible collection was created to interact with the Checkmk REST API. In this video, Robin demonstrates how you can use this Ansible collection to automate your monitoring with Checkmk.
Ep 35: Monitoring SQL databases with Checkmk
In this video, Robin demonstrates how you can configure your Checkmk site to monitor your SQL databases. As there are many flavours of SQL databases, the process is mostly the same.
Ep. 36: Introduction to different types of checks for monitoring with Checkmk
Learn about the different types of "checks" and services in Checkmk. In this video, Robin demonstrates how you can expand the information collected by your Checkmk agent using these different "Checks".
Ep. 43: Working with Hardware/Software inventory in Checkmk
In this video, Robin demonstrates the hardware/software inventory feature in Checkmk. With this feature one can get an overview of various pieces of hardware present in their servers, switches etc. and also the software packages installed on their operating system. Watch this video to learn more.