I want to create metric that show the current CPU Usage on a host.
Metric that I want is like on the Ganglia (gweb)
How I can build that?
If the host is Linux/UNIX you could install NRPE on the monitored host, then use check_nrpe to remotely run the check_cpu plugin.
If the host is windows, you could install NC_Net on the monitored host, then use check_nt to query the CPU usage.
If the host is SNMP-capable, you could use check_snmp to query the CPU OID , either 1.3.6.1.4.1.2021.11.11.0 (NET-SNMP) or 1.3.6.1.4.1.9.2.1.58.0 (HOST-MIB)
If the host is a VMware guest, then you need to query the VirtualCentre. Check on monitoringexchange.org for the check_vmware plugin.
This will allow Nagios to alert based on CPU usage thresholds. To obtain graphs and so on (as in Ganglia) you will need to add something like pnp4nagios to graph the perfstats.
Related
I want to know if I can use a system(run time pc) with Windows 10 OS which has TwinCAT XAR installed in it as a remote system. In other words can I select it as a target? Do we need any extra settings to make it work or it will work just like any other hardware controller?
Yes, you can select a Windows 10 PC with TwinCAT XAR installed as a remote target, however the performance may not be the same as you would get with purchasing a known hardware configuration from Beckhoff.
As noted in the Beckhoff documentation:
For a reliable, optimized and performant realtime behavior, a
completely aligned system design (hardware, BIOS, OS, drivers,
realtime-runtime) is mandatory. Each single component of the control
system has to be checked and optimized for this type of application -
that is the one and only way for an optimal, reliable and performant
realtime behavior. Beckhoff IPCs are optimized in each detail for this
type of operation. There is no guarantee for proper, reliable realtime
behavior on third-party PCs.
To use any Windows PC as a remote target, you need to ensure that the XAR is installed and that the Windows firewall is open to ADS. See also routing through a firewall. Specifically, you should open port 48898 to incoming TCP traffic and port 48899 to incoming UDP traffic in the Windows firewall. After this, you should be able to create a route normally using the IP address of the target PC through the ADS router on your development system.
You may also want to isolate a CPU core on the target system and dedicate TwinCAT tasks to it to ensure more consistent realtime behavior.
Finally, you need to purchase a license for the PLC if you intend to use it for a purpose other than development. This requires the higher performance level >= P90 and a license dongle, see this note about TwinCAT 3 licenses for non-Beckhoff IPCs.
I installed MicroStack in Ubuntu for the virtual machine. My instance floating IP is 10.20.20.238. I want to access my instance from Windows cmd,only can ping 172.21.10.13, but can't ping 10.20.20.238,so I want to change the 10.20.20.1 network to my own network. What should I do?enter image description here
Stackoverflow is about code development, not IT management. serverfault.com would be a more appropriate forum, or perhaps superuser.com.
microstack "fakes" the external network. It's not really external, but only exists on br-ex, the external bridge. It doesn't look like you can create a microstack cloud with a different external network CIDR, but you can try adding a subnet to the external network, inserting ens33 in br-ex and adding IP address 172.21.10.13 to br-ex . I have not tried this.
However, if your only requirement is to access the instance from the PC, you can create a tunnel or add a route. What makes sense in your case depends on the virtual machine hypervisor you are using (yours seems to be VMware - I can't comment on that) and the operating system on which this hypervisor runs.
has anyone from you pulled server hardware data from Nagios to build an inventory? Basically I am trying to create an inventory of an existing servers and hardware components monitored with nagios (i.e. hostname, CPU, MEM, HDD and etc.) There are other ways to do it, but maybe there is a plugin or a way to pull it directly from nagios?
Thanks
You could run this on the command line against your configuration files:
grep "host_name" /usr/local/nagios/etc/objects/hosts.cfg >>output.log
That will output a list of all parameters associated with the host_name line within your configuration.
There is a new mk_inventory plugin for nagios which will pull HW info from the machine
Hi I have just installed a clean copy of Nagios and Check_MK. But I don't understand how they work together. Nagios uses nrpe to connect to clients and performs checks. This means that some Nagios plugins have to sit on the client and return results from when they are called. But how does Check_MK tie into Nagios. Does it use check_mk_agent to replace all the Nagios plugins to perform its checks? Also does the Nagios configurations all have to be fully configured with all the clients already in place to be checked and then ported to Check_MK interface (wato) or can the clients be added to Check_MK without being present in the Nagios configurations. This is where my confusion lies and I cant find a concrete answer to this question anywhere. Please help.
Check_MK uses Nagios core for theses tasks:
Manage Check results
Triggering of alarms
Manage planned downtimes
Test host availability
Detect network failures
As you can see at the bottom of this page: http://mathias-kettner.com/checkmk_monitoring_system.html
Check_MK needs both: client side monitoring agent and server side monitoring system.
The server side monitoring system calls the agent of the host and passes the check results to the monitoring core (usually Nagios but there is also an new core just for Check_MK).
What makes Check_MK different from other passive Checks (like NRPE) is that the results for all checks is send to the monitoring system in one package. If you run the agent on a host in a shell it will return something like this:
➜ ~ check_mk_agent
<<<df>>>
/dev/mapper/MyStorage-rootvol ext4 15350768 13206900 1341052 91% /
dev devtmpfs 4022348 0 4022348 0% /dev
plus many more lines ....
So the server side part of Check_MK splits these packages into single checks so that the Nagios core can handle them.
So Check_MK wont replace your existing checks, it doesn't care about them. It will just add more.
You don't necessary need WATO to configure Check_MK. WATO is just an interface for the configuration. Configuration can also be done with plain text files. You should start with WATO and take a look at the configuration it has generated.
Is there a special group or a capability (similar to Linux' CAP_NET_xxx) that would enable a user to change network settings programmatically on Mac OS X? The settings I am interested in are the IP address and netmask of an interface, set programmatically from a C program (via an ioctl call, sending an ifreq struct). The user type I am using at the moment is a stock "Admin" account on my Mac laptop. Ultimately, I wish for my program to add the user once to such a convenient group so that in subsequent runs the user can manipulate the IP address of interfaces without prompting.
Thanks
Mac OS X will pretty much require root privileges to change any network settings. You would need to run the program as root in order to change the settings. As mentioned by #edufinn, the sudo command is ideal for this.
However, if you want to change the configuration in a supported manner you should try one of the following approaches:
Script the scutil command.
use the Dynamic Store API, which is part of the SystemConfiguration Framework.
use the networksetup command, which allows easy getting/setting of values.
Changing the configuration through these APIs will inform applications that the network configuration has changed so they can react appropriately - e.g. make/reset a connection.
Mac OS X is BSD system. You can run your program with sudo command. It's not very obvious from your post what is exactly a problem?