How to Find or Create an RSS Feed for Any Website

If you’re still a dedicated RSS user, you’ve no doubt noticed some sites no longer go out of their way to cater to you. Where once an RSS logo would be prominently displayed, now it’s nowhere to be found. How are you supposed to find RSS feeds?

Before you try one of the below options, try contacting the people behind your favorite sites: often they’ll get back to your with a URL. But when that fails, you need to take matters into your own hands. Here’s how to find, or even create, an RSS feed for any site, even when one isn’t prominently offered.

Finding Hidden RSS Feeds on Most Sites

Most sites are built using a Content Management System, or CMS. Every major CMS offers an RSS feed by default, meaning an RSS exists for such sites whether the site’s creators realize that or not. In these cases, you can use a simple URL hack to find the RSS feed.

Around 25 percent of sites are built using WordPress, for example. Many others are built on platforms like Google’s Blogger, Yahoo’s Tumblr, or Medium. Here’s how to find RSS feeds for all of those.

  • If a site is built using WordPress, simply add /feed to the end of the URL, for example https://example.wordpress.com/feed. You can also do this for category and pages, to get specific RSS feeds. Read more here.
  • If a site is hosted on Blogger, simply add feeds/posts/default to the end of the URL, for example http://blogname.blogspot.com/feeds/posts/defaultRead more here.
  • If a blog is hosted on Medium.com, simply insert /feed/ before the publication’s name in the URL. For example medium.com/example-site becomes medium.com/feed/example-site. You can do the same thing for individual author pages, if you want. Read more here.
  • If a blog is hosted on Tumblr, simply add /rss to the end of the homegpage’s URL. For example, http://example.tumblr.com/rss.

Create a Custom RSS Feed With Five Filters’ Create Feed Tool

The good folks at FiveFilters.org offer Feed Creator, a tool that scans any web page regularly and users any new links added to create an RSS feed. All you need is a URL and a few parameters.

The first field, “Enter Page URL,” is the simplest: copy the URL for the site you wish had an RSS feed and paste it here. The second, “Look for links inside HTML elements whose id or class attribute contains” is a bit more complex, but don’t panic: it’s actually pretty straightforward.

Head back to the site you’d like to create an RSS feed, then right-click an example of the sort of link you’d like to see in that RSS feed. Google Chrome will give you the option to “Inspect” the link; other browser should offer similar wording.

Do this and the Inspector will pop up, showing you the website’s code alongside the site itself.

The link you right-click should be highlighted, as shown, and the class of the URL should be visible in a pop-up for the link and in the left panel, though this may take some exploration depending on the site. The exact wording will vary, but in our example here “allmode-title” is what we’re looking for. Copy this and paste it back on the Feed Creator page.

The third and final field, “Only keep links if link URL contains,” gives you a touch more control. If you notice that only particular links to a particular page interest you, add some wording from that URL. This can help filter out ads and other annoyances.

Once all that is entered you should be able to click the big green “Preview” button.

If everything worked, you’ll see a collection of headlines.

Congratulations! You can now subscribe to an RSS feed for a site that previously didn’t have one. If not, don’t panic: just head back to Feed Creator and try some now criteria. This can take a while, but once you get the hang of it you’ll be able to create feeds for any site.

via How to Find or Create an RSS Feed for Any Website

How to manage vmware ESX with PowerShell

  1. Prerequisites:
    • Windows .Net Framework 2.0 (3.5 latest SP Recommended).
    • Windows PowerShell (V2 Recommended).
  2. Install vSphere client.
  3. Set the ‘Execution Policy’ of PowerShell to Remote Signed.
    • Run PowerShell as administrator.
    • Set-ExecutionPolicy RemoteSigned
  4. Type Exit and press Enter to leave the PowerShell prompt.
  5. Do it on both PowerShell consoles: x86 and x64.
  6. Download the PowerCLI software to your workstation from the following URL: http://vmware.com/go/PowerCLI
  7. Run the PowerCLI exe file.
  8. Install it all the way with default values. Click next until you arrived to finish screen and click finish.
  9. On your desktop you will now have two icons, which allow you to launch PowerCLI, a 64 bit version and a 32 bit version.
  10. Copy the PowerCLI modules folder to the PowerShell modules folder:
  11. C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Modules -> C:\Windows\System32\WindowsPowerShell\v1.0\Modules
  12. View the new vmware modules: Get-Module -ListAvailable | ? {$_.name -like “*VMware*”}
  • Example

C:\WINDOWS\system32> Get-Module -ListAvailable | ? {$_.name -like “*VMware*”}

    Directory: C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\PowerCLI\Modules

ModuleType Version    Name                                ExportedCommands

———- ——-    —-                                —————-

Binary     6.0.0.0    VMware.DeployAutomation

Binary     6.0.0.0    VMware.ImageBuilder

Binary     6.5.0.4… VMware.VimAutomation.Cis.Core

Binary     6.5.0.4… VMware.VimAutomation.Cloud

Manifest   6.5.0.4… VMware.VimAutomation.Common

Binary     6.5.0.2… VMware.VimAutomation.Core           HookGetViewAutoCompleter

Binary     6.0.0.0    VMware.VimAutomation.HA

Binary     7.0.2.4… VMware.VimAutomation.HorizonView

Binary     6.5.0.4… VMware.VimAutomation.License

Binary     6.5.0.4… VMware.VimAutomation.PCloud

Manifest   6.5.0.4… VMware.VimAutomation.Sdk            Get-PSVersion

Binary     6.5.0.4… VMware.VimAutomation.Storage

Binary     6.5.0.4… VMware.VimAutomation.Vds

Binary     6.5.0.4… VMware.VimAutomation.vROps

Binary     6.0.0.0    VMware.VumAutomation

  1. Import the modules you need: Import-Module -Name VMware.VimAutomation.Core
  2. The end.

Source: Back to Basics: Part 1 – Installing PowerCLI – VMware PowerCLI Blog – VMware Blogs

https://blogs.vmware.com/PowerCLI/2015/03/powercli-6-0-introducing-powercli-modules.html

How to upgrade ESXI to ESXI 6.0

How to upgrade ESXI to ESXI 6.0

  1. Disconnect the network storage
  2. Do not disconnect a LUN that contains an existing ESXI installation.
  3. Set the server hardware clock to UTC in BIOS.
  4. Boot the ESXI installer from a cd, DVD or USB.
  5. Select the drive on which to install or upgrade ESXI and press enter in the select a disk panel.
  6. Press F1 for information about the selected disk.
  7. Upgrade ESXI if the installer finds an existing ESXI installation and VMFS datastore.
  8. Press F11 to confirm and start the upgrade.
  9. Remove the installation cd or DVD or USB flash drive when the upgrade is complete.
  10. Press enter to reboot the host.
  11. Set the first boot device to be the drive which you selected previously when you upgraded ESXI.
  12. Connect back the network storage.

Source: Methods for upgrading to VMware ESXi 6.0 (2109711) | VMware KB

http://pubs.vmware.com/vsphere-60/index.jsp?topic=%2Fcom.vmware.vsphere.upgrade.doc%2FGUID-77D42D81-F47E-4FE9-B4B2-B15AB16C9C1A.html

How to add ISCSI disk to Ubuntu server from NetApp

General info

Target = storage system. In this case NetApp.

Initiator = the server. In this case Ubuntu Linux server.

Change iqn name = You must supply the iSCSI initiator node name when you set up igroups.

To make this process go smoothly, it is a good practice to write down the node name now. Before you record the node name, you might want to change it.

By default, a node name ends with a string of random numbers.

Changing this part of the name to something such as the host name can make the node name easier to use.

Note! You can only change the last portion of the iqn name: like change the name form iqn.2005-03.com.RedHat:012345 to iqn.2005-03.com.RedHat:Toaster.

On the Linux server

  1. Install open-iscsi
    1. sudo apt install open-iscsi
  2. Change iqn name to iqn format with the server name at the end
    1. sudo vi /etc/iscsi/initiatorname.iscsi
  3. Edit iscsi config file so that the server connects automatically to the Netapp after reboot.
    1. sudo vi /etc/iscsi/iscsid.conf
    2. change the folowing line to automatic:
    3. startup = automatic
  4. Restart the iscsi service
    1. sudo systemctl restart iscsid
  • go to Netapp steps. When done, comeback here.
  1. Rediscover the Netapp
    1. sudo iscsiadm -m discovery -t sendtargets -p 192.168.1.53
  2. Connect to the netapp
    1. sudo iscsiadm -m node –login
  3. Get the list of disks on the server and locate the new ISCSI disk
    1. dmesg | grep sd
  4. Create a new partition
    1. sudo fdisk /dev/sdb
    2. n (Add new partition).
    3. P (Primery partition).
    4. enter
    5. w (Write table to disk and exit).
  5. Format the file system and mount it to /srv
    1. sudo mkfs.ext4 /dev/sdb1
    2. sudo mount /dev/sdb1 /srv
  6. Add an entry to /etc/fstab file – to mount the iscsi drive during boot:
    1. /dev/sdb1 /srv        ext4    defaults,auto,_netdev 0 0
  7. Reboot the server and verify that the disk is automatically up.
    1. sudo reboot -h now
    2. df -h

 

  • If for some reason you want to disconnect from the Netapp which means to disconnect the ISCSI disk from the server, you can logout with:
    1. sudo iscsiadm -m node –logout
  • If for some reason you want to uninstall open-iscsi package from the server, you can do it with:
    1. service open-iscsi stop
    2. sudo apt-get remove –auto-remove open-iscsi
    3. sudo reboot
    4. sudo apt-get purge open-iscsi

On the Netapp storage

  1. Create new volume
  2. Create new qutree
  3. Create new LUN
  4. Create new initiator group
  5. Add the Linux server initiator name to the initiator group
    1. You can get the initiator name by going to the Linux server and look in the initiator config file: sudo cat /etc/iscsi/initiatorname.iscsi

Sources:

(iSCSI) How to configure iSCSI for Linux

https://help.ubuntu.com/lts/serverguide/iscsi-initiator.html#iscsi-initiator-install

http://installion.co.uk/ubuntu/trusty/main/o/open-iscsi/uninstall/index.html

https://www.howtogeek.com/106873/how-to-use-fdisk-to-manage-partitions-on-linux/

Give people delegate permissions for a distribution group Office 365

 

 

Give people delegate permissions for a distribution group

If you are an Office 365 admin, you can give people delegate permissions to send email from, and on behalf of a distribution group.

  1. Log in to your office 365 admin center.
  2. Click the Admin tile.
  3. In the Office 365 admin center panel, click Groups.
  4. In the Groups panel, check the box next to the group you want to add delegates to.
  5. In the right panel, under Distribution list, click Edit Exchange properties.
  6. Click group delegation.
  7. Use the following to help you determine whether you want to assign Send As or Send on Behalf permissions

Send As:

This allows a member of the group to send email as the distribution group address. To a recipient, the From line will display the group name only.

Send on Behalf:

This allows a member of the group to send email on behalf of the group. To a recipient, the From line will display the sender “on behalf of” the group.

To send as the distribution group, you need to show the From field in your email composer. To show the From field in Outlook, open a new email, click Options, and select From.

Source: Give people delegate permissions for a distribution group | Office 365 from GoDaddy – GoDaddy Help GB

Synchronize ESXi/ESX time with a Microsoft Domain Controller

Synchronize ESXi/ESX time with a Microsoft Domain Controller

When using Active Directory integration in ESXi/ESX 4.1 and newer, it is important to synchronize time between ESXi/ESX and the directory service to facilitate the Kerberos security protocol.

ESXi/ESX support synchronization of time with an external NTPv3 or NTPv4 server compliant with RFC 5905 and RFC 1305. Microsoft Windows 2003 and newer use the W32Time service to synchronize time for windows clients and facilitate the Kerberos v5 protocol. For more information, see the Microsoft Knowledge Base article 939322 and How the Windows Time Service Works.

By default, an unsynced Windows server chooses a 10-second dispersion and adds to the dispersion on each poll interval that it remains in sync. An ESXi/ESX host, by default, does not accept any NTP reply with a root dispersion greater than 1.5 seconds.

Configure Windows NTP Client:

ESXi/ESX requires an accurate time source to synchronize with. To use a Windows 2003 or newer server, it should be configured to get its time from an accurate upstream NTP server

Use the registry editor on the Windows server to make the configuration changes:

Enable NTP mode:

Locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

Set the Type value to NTP.

Enable the NTP Client:

Locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config

Set the AnnounceFlags value to 5.

Specify the upstream NTP servers to sync from:

Locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders

Set the NtpServer value to a list of at least 3 NTP servers.

Example: You might set the value to:

1.pool.ntp.org,0x1 2.pool.ntp.org,0x1 3.pool.ntp.org,0x1

Note: On a Windows 2008 Domain Controller, NtpServer is located in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters.

Specify a 15-minute update interval:

Locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient

Set the SpecialPollInterval value to 900.

Restart the W32time service for the changes to take effect.

Configure ESXi/ESX NTP and Likewise Clients

vSphere Client

Configure ESXi/ESX to synchronize time with the Windows server Active Directory Domain Controller:

  1. Connect to the ESXi/ESX host or vCenter Server using the vSphere Client.
  2. Click the ESXi/ESX host in the inventory.
  3. Click the Configuration tab.
  4. Under the Software heading, click Time Configuration.
  5. Click Properties.
  6. Ensure that the NTP Client Enabled option is selected.
  7. Click Options.
  8. Click NTP Settings.
  9. Click Add and specify the fully qualified domain name or IP address of the Windows server Domain Controller(s).
  10. Click OK.
  11. Click OK to save the changes.

vSphere Web Client

  1. Log in to the vSphere Web Client with administrator credentials.
  2. Click on Hosts and Clusters.
  3. Select the ESXi host from the list
  4. Click Manage > Settings.
  5. Expand System and select Time Configurations.
  6. Click Edit.
  7. Enter the Windows server Domain Controller(s) information.

Additional configuration must be done from the command line.

ESX/ESXi 4.x and 5.x

Open a console to the ESXi/ESX host. For more information, see Connecting to an ESX host using a SSH client (1019852) or Using Tech Support Mode in ESXi 4.1 and ESXi 5.0 (1017910).

Open the /etc/ntp.conf file in a text editor. For more information, see Editing configuration files in VMware ESXi and ESX (1017022).

Add the tos maxdist command on its own line:

tos maxdist 30

Save and close the configuration file.

Make the /etc/likewise/lsassd.conf file writable by running the command:

chmod +w /etc/likewise/lsassd.conf

Open the /etc/likewise/lsassd.conf file in a text editor.

Locate the sync-system-time option, uncomment it, and set the value to no:

sync-system-time = no

Save and close the configuration file.

On ESXi, save the configuration changes to the boot bank so they persist across reboots by running the command:

/sbin/auto-backup.sh

Restart the ntpd and lsassd services for the configuration changes to take effect by running the commands:

service lsassd restart

service ntpd restart

Note: To restart the ntpd and lsassd services on an ESXi host, run these commands:

/etc/init.d/lsassd restart

/etc/init.d/ntpd restart

If the ntpd and lsassd services do not restart, consider restarting the management agents first. For more information about restarting the management agents, see Restarting the Management agents on an ESX or ESXi Server (1003490).

ESXi 6.0

Connect to the ESXi host using an SSH session. For more information, see Using ESXi Shell in ESXi 5.x and 6.0 (2004746).

Open the /etc/ntp.conf file in a text editor. For more information, see Editing configuration files in VMware ESXi and ESX (1017022).

Add the tos maxdist command on its own line:

tos maxdist 30

Save and close the configuration file.

Run this command to access the likewise shell:

/usr/lib/vmware/likewise/bin/lwregshell

Note: If the command fails with the error:

lwregshell (error = 40700 – LWREG_ERROR_NO_SUCH_KEY_OR_VALUE)

Run this command to start the likewise service and then run the command to access the likewise shell:

/etc/init.d/lwsmd start

Navigate to the HKEY_THIS_MACHINE\Services\lsass\Parameters\Providers\ActiveDirectory directory with this command:

cd HKEY_THIS_MACHINE\Services\lsass\Parameters\Providers\ActiveDirectory

Run this command to change the synchronization time:

set_value SyncSystemTime 0

Exit the shell by typing quit and pressing Enter.

Refresh the lsass service with this command:

/usr/lib/vmware/likewise/bin/lwsm refresh lsass

For example:

/usr/lib/vmware/likewise/bin/lwsm refresh lsass

Refreshing service: lsass

To verify the changes to the registry key, run this command:

/usr/lib/vmware/likewise/bin/lwregshell list_values “[HKEY_THIS_MACHINE\Services\lsass\Parameters\Providers\ActiveDirectory]”

Once the configuration changes are complete, ensure that the time is synchronized between the ESXi/ESX host and the Windows server. For more information, see Troubleshooting NTP on ESX and ESXi (1005092).

Source: Synchronizing ESXi/ESX time with a Microsoft Domain Controller (1035833) | VMware KB

Configure ESXi host with Active Directory authentication

Configuring the ESXi host with Active Directory authentication

Purpose

This article provides steps to add an ESXi host to the Active Directory.

Resolution

To add an ESXi host to the Active Directory:

  1. Confirm the ESXi host is synchronizing time with the Active Directory Domain controller.
  2. From the vSphere Client, select the host that you want to add to the Active Directory.
  3. Click the Configuration tab
  4. Click the Authentication Services.
  5. Click the Properties link at the top right pane.
  6. In the Directory Services Configuration dialog, select the directory service from the dropdown.
  7. Enter a domain.
  8. Click Join Domain.
  9. Enter the user name (in user@domain.com format) and password of a directory service user account that has permissions to join the host to the domain and click OK.
  10. Click OK to close the Directory Services Configuration dialog box.
  11. Click the Configuration tab and click Advanced Settings.
  12. Navigate to Config > HostAgent.
  13. Change the Config.HostAgent.plugins.hostsvc.esxAdminsGroup setting to match the Administrator group that you want to use in the Active Directory. These settings take affect within a minute and no reboot is required.

Notes:

  • If the Config.HostAgent.plugins.hostsvc.esxAdminsGroup setting is changed, ensure to remove any invalid users from the Permissions tab of the ESXi host.
  • In ESXi 4.1, the ESX Admins container is hard coded and must be added on the Active Directory side for authentication to work.

Source: Configuring the ESXi host with Active Directory authentication (2075361) | VMware KB

How to Check MD5 checksum of a File on Windows

What is MD5 Sum?

MD5 is a widely known term in the tech world but if you are an active Android users, you must have confronted the terms like “md5sum”, “md5 hash” or “md5 checksum” quite frequently. Most official and custom ROMs, mods and recovery flushable ZIPs come pre-encrypted with a unique code for security reasons. It’s a kind of password that is used to ensure the integrity of files inside a ZIP or a software package.

An MD5 checksum is a mathematical algorithm is usually a set of 32-character hexadecimal letters and numbers that are computed on a file with a tool. These numbers are generated using special tools that employ “cryptographic hash function producing a 128-bit (16-byte) hash value”. It is used not only to encrypt a ZIP archive or an EXE installer but all kinds of files. You can assign an MD5 sum even to a text or document file. The perfect match of MD5 checksum value ensures that the digital integrity and security of a file has not been broken by someone else and also that it is the accurate copy of the original file.

Thus, there are the two main reasons if the MD5 hash value of a file you downloaded does not match against the original sum:

  1. The file might be modified by someone else in an unauthorized way.
  2. The file was not downloaded properly and some of its elements might have been corrupted.

The MD5 checksum or hash value of a file might look like these:

25912deacc5d55528e223ec7b99705cc

220c41f3b03f42190899db8cb081b5c6

a578d837343fe2542ecf405a630d46a0

8223ec1c2aa71503b431a0daabb23154

Why to Verify MD5?

Installing an official firmware, a custom ROM or even a Kernel file with corrupt MD5 value can lead to a bricked phone or tablet. It is, therefore, very important that whenever you download such files with a purpose to install them on your device, make sure to compare/match the computed MD5 checksum against the one provided on the download page to verify their integrity. I have seen various cases where people report that their device went to bricked state after installing a certain file. In many cases, you might get an installation failed error if the MD5 hash value is not correct.

It is a customary practice among Android developers to mention the MD5 sum of their ROMs, mods, and kernels when they share them. Having downloaded such files, you can run an MD5 checker program on your computer to match the MD5 value. It the sum matches perfectly; you can proceed to install the file. In case there is a mismatch between the values, you should avoid installing such files.

To make sure that it is just a case of bad download, try downloading the file again, preferably from a different mirror or browser. If the match fails again, contact the developer and report it. He/she might check if the MD5 they provided was correct or give you an alternate link to get the file.

Verify MD5 Checksum on Windows

If you are a Windows user. you can find a variety of MD5 checksum programs available on the internet that can be used for the purpose. Personally, I use a very nice and easy to use a tool called WinMD5Free. Here is how you can use it to verify:

  1. Download the latest version of WinMD5Free from the official site: Click Here  [mirror]
  2. Extract the downloaded zip and launch the WinMD5.exe file.
  3. Click on the Browse… button, navigate to the file that you want to check and select it.
  4. Just as you select the file, the tool will show you its MD5 checksum.
  5. Now copy and paste the original MD5 value provided by the developer or the download page in the box below.
  6. Then click on Verify button.
  1. The tool will then give you the match results and shown above.

How to Check/ Verify MD5 CheckSum of a File on Windows, Mac and Linux

how to Search-Keywords in files – PowerShell function

function Search-File{
PARAM(
[STRING[]]$Path = $pwd,
[STRING[]]$Include = “*.ps1”,
[STRING[]]$KeyWord = (Read-Host “Keyword?”),
[SWITCH]$ListView
)

<#
Descrition: This function allows you to search a folder and it’s sub directories for files containing a keyword.

Exampls: Search-File -Path C:\temp -Include “*.pdf” -KeyWord “nagios”

Date: Sunday, April 3, 2016 10:03:16 AM

The function uses three parameters and one switch.

Parameters

-Path
By default, the path will use your present working directory ($pwd). The search path is always recursive.

-Include
By default the include is set to “*.ps1”. The value for this parameter filters by file name.
Examples : -Include “*.log” or “Servers*.log”

-Keyword
If no value is provided you will be prompted with “Keyword?:”.
This parameter invokes “Search-String -Simplematch $Keyword”; I sometimes search for regular expressions, but a switch could be added to the function to utilize “Search-String -Pattern” allowing use of regular expressions in the keyword search.
Uses a simple match rather than a regular expression match. In a simple match, Select-String searches the input for the text in the Pattern parameter. It does not interpret the value of the Pattern parameter as a regular expression statement.

Switches

-ListView
While the default formatting neatly groups matched lines under the filename, the line is truncated. If you want to see the full line containing the match, use this switch.

#>

Get-ChildItem -path $Path -Include $Include -Recurse | `
sort Directory,CreationTime | `
Select-String -simplematch $KeyWord -OutVariable Result | `
Out-Null

IF ($ListView) {
$Result | Format-List -Property Path,LineNumber,Line
}
ELSE {
$Result | Format-Table -GroupBy Path -Property LineNumber,Line -AutoSize
}

}

Source: Search-Scripts – PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources

How to Monitor haproxy with Cacti

How to Monitor haproxy with Cacti

Install package

yum install net-snmp net-snmp-utils –y

Verify installation

rpm -qa | grep net-snmp*

net-snmp-agent-libs-5.7.2-24.el7.x86_64

net-snmp-5.7.2-24.el7.x86_64

net-snmp-libs-5.7.2-24.el7.x86_64

net-snmp-utils-5.7.2-24.el7.x86_64

Edit SNMP configuration file

vi /etc/snmp/snmpd.conf

rocommunity   ec1980

syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)

view    systemview    included   .1.3.6.1.2.1.1

view    systemview    included   .1.3.6.1.2.1.25.1.1

access  notConfigGroup “”      any       noauth    exact  systemview none none

disablePerl false

perl do ‘/etc/snmp/haproxy.pl’;

Open firewall UDP port 161

firewall-cmd –permanent –add-port=161/udp

firewall-cmd –reload

firewall-cmd –list-all

systemctl stop firewalld

systemctl disable firewalld

Start SNMP service

systemctl start snmpd

systemctl enable snmpd

Edit haproxy configuration file # Global settings

vi /etc/haproxy/haproxy.cfg

#———————————————————————

# Global settings

#———————————————————————

global

 

    # to have these messages end up in /var/log/haproxy.log you will

    # need to:

.

.

.

.

 

#    stats socket /var/lib/haproxy/stats

stats socket /var/run/haproxy.stat mode 666

Download haproxy installation files from haproxy website to /tmp folder

cd /tmp/

wget http://www.haproxy.org/download/1.5/src/haproxy-1.5.16.tar.gz

tar zxvf haproxy-1.5.16.tar.gz

cd haproxy-1.5.16

cd contrib

cd netsnmp-perl

Copy haproxy.pl to snmp folder

 cp haproxy.pl /etc/snmp/

Install perl-Net-SNMP package

yum provides ‘*/Net/SNMP.pm’

yum install epel-release

yum install perl-Net-SNMP

Verify Installation

rpm -qa | grep net-snmp*

net-snmp-agent-libs-5.7.2-24.el7.x86_64

net-snmp-5.7.2-24.el7.x86_64

net-snmp-perl-5.7.2-24.el7.x86_64

net-snmp-libs-5.7.2-24.el7.x86_64

net-snmp-utils-5.7.2-24.el7.x86_64

Restart snmp service

systemctl restart snmp

Restart haproxy service

service haproxy restart

Validate haproxy perl script

perl /etc/snmp/haproxy.pl # even if this doesn’t work check that the query works.

Validate internal SNMP query works

snmpwalk -v 1 -c ec1980 -O e 127.0.0.1

snmpbulkwalk -c ec1980 -v2c 127.0.0.1 1.3.6.1.4.1.29385.106.2.0

Copy cacti XML files from haproxy installation files to cacti resource folders

C:\inetpub\wwwroot\cacti\resource\snmp_queries

cacti_data_query_haproxy_backends.xml

cacti_data_query_haproxy_frontends.xml

haproxy_backend.xml

haproxy_frontend.xml

haproxy_socket.xml

C:\inetpub\wwwroot\cacti\resource\script_queries

haproxy_backend.xml

haproxy_frontend.xml

haproxy_socket.xml

C:\inetpub\wwwroot\cacti\resource\script_server

haproxy_backend.xml

haproxy_frontend.xml

haproxy_socket.xml

Add data query and graphs

Finish!