ACE and secondary sorry server?

Hi,
I need to transfer the CSS' concept of the "secondary sorry server" to the ACE.
My (so far untested) idea is: attaching a backup server-farm to the primary server-farm to get the "sorry server" function; attaching a backup rserver to the rserver used in the backup server-farm to get a backup for the backup.
Will it work this way?
Arno

Cascading serverfarms is restricted to one backup level but you can cascade backup for individual servers.

Similar Messages

  • Mail and secondary mail server.

    Hello.
    As I am working on my mail server I would like to ensure that I have some form of back system to prevent me from looosing e-mail messages in the future, specially those that are business related. Once in a while we experience a power outage and I would hate to loose an important business e-mail sent to us at a time when the mail server is down.
    Questions:
    1. Is there a way to have/use a remote secondary mail server so that in case an e-mail is sent but can't be delivery to our mail server, it is then re-routed to this secondary mail server so that it isn't lost. In this case how should this be set-up both on the server in OS X 1.6.8 and on the outside?
    2. I plan to set up an account with Google or another e-mai service provider but would like my e-mail to use my own domain name instead. How simple would this be to set UP? Will Google allow the creation of e-mail accounts with the use of domain names other than its own?
    Thank you in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         

    Hi, capaho.
    I just called GoDaddy (my registrar) and this time didn't get much help. My experience with GoDaddy has been nothing but extremely positive. Their customer service is one of the best I have experienced but today in particular I wasn't so lucky as the gentleman in technical support to helped me on the phone sounded very inexperienced and seemed to know less about this than I do (and that takes effort).
    Both solutions you mentioned sound good to me and I do agree that having the e-mail forwarded to another acount would likely be the simplest solution. But how would I set this up ? How can I setup my account settings at GoDaddy so that when e-mail comes in it is directed to my server as the MX Record points to it, but a copy is also forwarded to a GMail or other similar e-mail account ?
    It is important to me for this process to take place BEFORE not AFTER it hits my server. I have grown concerned about loosing business opportunities and facing financial losses from e-mails that are not delivered to me properly. My server can fail for a multitude of reason and I wish to prevent this.
    > If your mail server has a fatal error that would kill mail on the first pass,it would be
    > affecting all mail, not just some messages, so it's unlikely you have such a problem.
    I have had this happen before and this is one of the reasons I am trying to establish some form of redundancy so it doesn't happen again in the future.
    > You could set the mail server to forward all undeliverable mail to the admin mail account
    > in Server Admin.  That would make sure you didn't miss any messages, but you would
    > likely start getting a lot of spam that would otherwise bounce.
    How can I do this ? Can this be setup so that all undeliverable mail is forwarded to the admin account UNLESS it is undeliverable because the system has found it to be spam ? In other words, if the e-mail is undeliverable because the user account has been deleted or the address can't be found on the server the message would then be forwarded to the admin account. On the other hand, if the system has judged the e-mail to be spam it would then just be treated as such.
    Any help you can offer with this issues will be very appreciated.
    Thanks.

  • CSS and a Sorry Server

    I have been trying to get my CSS 11506 to redirct to a Sorry Server when our content servers go offline. We thought that we had it working, but after some downtime it turned out that our configuration did not work.
    After extensive reading I can't figure out what is wrong with my config, or if the problem lies else where. I am attaching my config below, can anyone tell me if they see any problems with what I have or if there is something that I need to do in addition to what I have. Thank you for you help, here is the config:
    *************************** GLOBAL ***************************
    no restrict web-mgmt
    no restrict xml
    bypass persistence disable
    snmp community ******read-write
    snmp name "******"
    snmp contact "*******r"
    snmp location "CSS11056"
    snmp trap-host 10.20.1.4 ******
    dns primary 10.20.1.2
    ftp-record ******10.20.1.17 *** des-password
    ibfebcgg6aheuc4h1hfcqhpcubwdxcjb cssgui
    ip route 0.0.0.0 0.0.0.0 10.20.1.1 1 !
    *************************INTERFACE*************************
    interface 1/1
    phy 1Gbits-FD-sym !
    **************************CIRCUIT**************************
    circuit VLAN1
    router-discovery lifetime 1000
    ip address 10.20.1.4 255.255.255.0
    router-discovery
    **************************SERVICE**************************
    service Blade01
    ip address 10.20.1.60
    active
    service Blade02
    ip address 10.20.1.61
    active
    service Blade03
    ip address 10.20.1.62
    active
    service Blade04
    ip address 10.20.1.63
    active
    service sorry
    ip address 10.20.1.41
    active
    !*************************** OWNER***************************
    owner ***
    email-address ******
    content Content1
    vip address 10.20.1.80
    balance aca
    add service Blade01
    add service Blade02
    no persistent
    primarySorryServer sorry
    active
    content Content2
    vip address 10.20.1.81
    add service Blade03
    add service Blade04
    balance aca
    active
    !*************************** GROUP***************************
    group content1nat
    vip address 10.20.1.80
    add destination service Blade01
    add destination service Blade02
    add destination service sorry
    group content2nat
    add destination service Blade03
    add destination service Blade04
    vip address 10.20.1.81
    !**************************** ACL ****************************
    acl 10
    clause 5 permit any 10.20.1.60 destination content ****
    sourcegroup ****
    clause 6 permit any 10.20.1.61 destination content ICC/flippid
    sourcegroup Content1
    clause 99 permit any any destination any
    clause 2 permit any 10.0.0.0 destination content ****
    sourcegroup ****
    apply circuit-(VLAN1)
    clause 7 permit any 10.20.1.41 destination content ****
    sourcegroup Content1

    One problem I can see is that you don't have any keepalives configured under the services, so they will default to a Ping. As long as they respond to ping, it will keep traffic going to those servers.
    What services run on these Servers? We generally recommend you use as higher layer keepalive as possible, so if it is a web server for example, use a HTTP keepalive.
    Have a look here for more info:
    http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/css11500series/v8.10/configuration/content_lb/guide/KAL.html

  • CSM : Sorry server and Stickyness when reals are overloaded

    Hi,
    I have a portal of eight real servers and one sorry server, which should redirect new user to another portal, in case of an overload condition of all eight real servers. Server load is measured on each real server using a custom developed agent, which basically measures the real CPU load. If a real server experiences an overload, the local agent uses the CSM XML interface to set the maxcons value in the CSM to stop accepting new connections. However, I want to continue accepting sticky connections (request with a valid cookie). The experience shows that the CSM does accept to create new connections to real server reaching maxcons, even if a cookie exist.
    This causes a problem if we want to redirect NEW users to another portal in case of overload, but to keep EXISTING users in the server farm, even if the number of connections could increase slightly above maxconns...
    How can I solve the problem ?
    Thank you
    Yves Haemmerli

    Hi Thomas,
    Thank you for your comment. I also understand this behaviour like you, however this can have a devastating effect in a global portal environment. Imagine, you have three portals distributed over the world, each having let say 8 real servers. In the real life, it is seldom to replicate data in real time between data centers, due to the distance. However, the user roles and customized bookmarks and other user-specific settings are replicated. This allows to provide a global portal to users. But if a user connects to one particular regional portal, he has to stay on this portal for the duration of the whole browser session, do you follow me ? OK, now imagine that all 8 real servers in a portal reach the maxconns, because 10'000 users are connected to the portal. For new users (users with no sticky cookie), we want to send them to another regional portal. This is achieved with the global site selection provided by the GSS for example. But for existing user already connected to the overloaded portal, we want to KEEP them on the portal ! else, as the user browser continuously opens and closes TCP sessions, all 10'000 users will be immediately transferred to the other regional portal! This means the the other regional portal will becom overloaded as well, while the first portal load will be droped to zero very quickly ! Then, we not only create a situation where users loose their data by being transferred to another portal, but we also create a oscillations in the portal load !
    I really don't know if there is a mean to solve this problem...Do you have any idea ?
    Regards,
    Yves Haemmerli

  • CSM : Server overload and sorry-server

    Hi,
    I have a portal of eight real servers and one sorry server, which should redirect new user to another portal, in case of an overload condition of all eight real servers. Server load is measured on each real server using a custom developed agent, which basically measures the real CPU load. If a real server experiences an overload, the local agent uses the CSM XML interface to set the maxcons value in the CSM to stop accepting new connections. However, I want to continue accepting sticky connections (request with a valid cookie). The experience shows that the CSM does accept to create new connections to real server reaching maxcons, even if a cookie exist.
    This causes a problem if we want to redirect NEW users to another portal in case of overload, but to keep EXISTING users in the server farm, even if the number of connections could increase slightly above maxconns...
    How can I solve the problem ?
    Thank you
    Yves Haemmerli

    Try this doc:
    http://www.cisco.com/en/US/products/hw/modules/ps2706/products_configuration_example09186a00801a51ba.shtml

  • Using Open DNS etc with a Verizon and secondary router

    I have a Airport Extreme Base Station setup in Bridge Mode to the Verizon router. How do I add  or replace the DNS server to Open DNS etc?

    You need to set your desired DNS servers in the Actiontec since that is your DHCP server.  When the AEBS is in bridge mode, its DHCP server is disabled.
    Login to the Actiontec
    Click on the My Network icon
    Select Network Connections from the left menu
    Select Broadband coax or Broadband ethernet as appropriate.
    Click on Settings
    Across from DNS Server, select "Use the following DNS Server addresses" from the pulldown.
    Enter the primary and secondary DNS Server addresses for OpenDNS.
    Click Apply.

  • SCCM 2012 R2 update from 2012 in VM on SDC and secodary DNS server

    Hi there,
    I'm currently running SCCM2012 (not R2) on a secondary domain controller and secondary DNS Server. Bought a license for this in 2013. Would like better separation from above functions and deploy R2 version. Two questions:
    1) Is it recommended to install SCCM R2 in a VM on a machine running above applications?
    2) Do I need a new license to go from SCCM 2012 to SCCM 2012 R2?
    Thank you for an answer, Marcel

    Actually, for #2, that's not true. ConfigMgr 2012 and ConfigMgr 2012 R2 are separate SKUs and require their own licensing. Just because you have ConfigMgr 2012 does not entitle you to 2012 R2. It depends upon how you licensed it in the first place. If
    you have Software Assurance (SA), then yes, your current licensing applies. You should check with your LAR or call the Microsoft licensing helpdesk to figure out if you are licensed for R2.
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • ACE sorry server and sticky

    I have configured 3 different serverfarms with including realservers
    2 of them are with websites, the other 1 is with webservices
    I also have configured a sorry server farm and the including rserver.
    On the sorry rserver i have configured 2 maintenance websites, listening to an unique hostheader.
    So for serverfarm A & B i have configured a seperate maintenance website.
    Now when i take rservers from serverfarm A or B down, the sorry server will get active for the needed farm.
    However i can only reach 1 maintenance website. And even so, an url used to reach farm A gets on maintenance site from B
    This is strange behaviour, doesnt a sorryserver just accept requests with the requested hostheader by the client ?
    Also, when i put the rservers from A and B back into service i have to do a "clear stick database all" otherwise the sorryserver will remain active.
    What is wrong here ?
    probe http EHIC-http
    description Test op WWW functionaliteit
    interval 10
    passdetect interval 30
    request method get url http://acc.site-B.nl/web/
    expect status 200 200
    header Host header-value "acc.site-B.nl"
    expect regex 1.8.0.2
    probe http WWW-http
    description Test op WWW functionaliteit
    interval 10
    passdetect interval 30
    request method get url http://acc.site-A.nl/web/default.aspx
    expect status 200 200
    header Host header-value "acc.site-A.nl"
    expect regex v1.9.2.327
    serverfarm host EHIC-FARM
    failaction purge
    predictor leastconns slowstart 30
    probe EHIC-http
    rserver ehic_server01.site-B.nl
    inservice
    serverfarm host SORRY-FARM
    failaction purge
    predictor leastconns
    rserver sorrypage.site-C.nl
    inservice
    serverfarm host WBS-FARM
    failaction purge
    predictor leastconns slowstart 30
    probe ICMP-PROBE
    rserver acc-wbs01v.site-D
    inservice
    rserver wbs_01.site-D
    inservice
    rserver wbs_02.site-D
    inservice
    serverfarm host WWW-FARM
    failaction purge
    predictor leastconns slowstart 30
    probe WWW-http
    rserver acc-www01v.site-A
    inservice
    rserver acc_server01.site-A
    inservice
    rserver acc_server02.site-A
    inservice
    sticky ip-netmask 255.255.255.255 address source EHIC-FARM-STICKY
    serverfarm EHIC-FARM backup SORRY-FARM
    sticky ip-netmask 255.255.255.255 address source WWW-FARM-STICKY
    serverfarm WWW-FARM backup SORRY-FARM
    class-map match-any EHIC-VIP
    2 match virtual-address 172.30.9.4 tcp eq https
    3 match virtual-address 172.30.9.4 tcp eq www
    class-map match-any WBS-VIP
    6 match virtual-address 172.30.5.4 tcp eq www
    7 match virtual-address 172.30.5.4 tcp eq https
    class-map match-any WWW-VIP
    2 match virtual-address 172.30.6.4 tcp eq www
    3 match virtual-address 172.30.6.4 tcp eq https
    policy-map type loadbalance first-match EHIC-FARM-STICKY-BALANCE
    class class-default
    sticky-serverfarm EHIC-FARM-STICKY
    policy-map type loadbalance first-match WBS-FARM-BALANCE
    class class-default
    serverfarm WBS-FARM
    policy-map type loadbalance first-match WWW-FARM-STICKY-BALANCE
    class class-default
    sticky-serverfarm WWW-FARM-STICKY
    policy-map multi-match LOADBALANCING-EHIC
    class EHIC-VIP
    loadbalance vip inservice
    loadbalance policy EHIC-FARM-STICKY-BALANCE
    loadbalance vip icmp-reply active
    appl-parameter http advanced-options EHIC-PARAMETERS
    policy-map multi-match LOADBALANCING-WBS
    class WBS-VIP
    loadbalance vip inservice
    loadbalance policy WBS-FARM-BALANCE
    loadbalance vip icmp-reply active
    appl-parameter http advanced-options WBS-PARAMETERS
    policy-map multi-match LOADBALANCING-WWW
    class WWW-VIP
    loadbalance vip inservice
    loadbalance policy WWW-FARM-STICKY-BALANCE
    loadbalance vip icmp-reply active
    appl-parameter http advanced-options WWW-PARAMETERS
    Regards,
    Sebastian

    Hi Gilles,
    Here is our full config, i only changed some domain names.
    I'll try to describe the problem again ;
    We have published a website by vip 172.30.6.4
    We have another website published by vip 172.30.9.4
    These websites are hosted by realservers configured in 2 serverfarms and can be reached from the internet (secured by an ASA)
    For both of these farms i have configured a sorryserver. This sorry server should serve a webpage containing a maintenance message whenever a farm should get down.
    The sorry server is configured with 2 websites, each listening to the specific hostheader. This hostheader is the same as configured on the rservers for the specific farm 172.30.6.4 or 172.30.9.4.
    So what i am trying to accomplish is that i only need 1 sorryserver to server 2 sorry webpages, ofcourse listening to a hostheader to get 2 different sorrypages to be returned.
    Now when i take all realservers for both serverfarms down, except for the sorryserver, i can only reach 1 sorrypage.
    For example, site A and B are down, when i try to reach site A i get to the sorrypage of site A. But when i try to reach site B i too get served the sorrypage of site A.
    And also when i "inservice" all rservers again i have to do a "clear sticky database", otherwise the sorryserver will remain active.
    Now i have upgraded to the last version of the ACE ios, but i still have to test if the same problem persists so i will give feedback on this later.
    Regards,
    Sebastian

  • ACE - Sorry Server

    Here is a description of the problem I am having:
    I have a VIP configured  using 2 serverfarms. ServerFarm-A as the primary and ServerFarm-B as the backup.
    Serverfarm-A (Primary) contains 2 webservers hosting the website
    Serverfarm-B (BackUp) contains 1 server simply hosting a sorry page
    When  Serverfarm-A (Primary) fails, I recieve the sorry page hosted on Serverfarm-B (Backup)
    This action works fine with no issues. I simply click the refresh button on my browser and get the sorry page.
    When Serverfarm-A (Primary) comes back on-line I still recieve the sorry page hosted on Serverfarm-B (Backup)
    The only way I do not recieve the sorry page is if the client deletes its cache from the browser. (This issue occurs in both IE and FireFox)
    I am assuming that since this action does not occur when ServerFarm-A goes down why would it happen the opposite way.
    I have tried several differnt configs recommended by TAC and still no luck.
    I am hoping someone has come across this issue and can help.

    Larry,
    Have you compared the headers that are being sent by the servers in the primary farm with those of the sorry serverfarm? If the sorry servers are marking the content as cacheable but the primary servers are not then you could perhaps configure the sorry servers with the same settings.
    Is the sorry server giving actual application content or just a sorry page telling the user the site is unavailable?
    Also when you refresh is the browser making a new tcp connection to the vip or is it just sending a get on the existing tcp conversation? A wireshark trace on the client would show if it is a new connection or a continuation of the existing one. If the connection is still established and you are just sending another get on the same tcp stream you may want to try and disable connection keepalive on the web server. When the primary farm comes back up only new tcp connections should be sent there. The existing connection will stay on the server they were initially sent to.

  • ACE 4710 - 'reverse proxy' infront of serverfarm - fail-over/sorry server design issue

    Hi All,
    I'm working on a specific config and have an issue in the backup farm/fail-over/sorry server area.
    The customer wants the following:
    They have an existing serverfarm with X web servers, they want a single server to act as a reverse-proxy in front of the farm.
    So that all traffic goes trough that server, that server then forwards the request to the original serverfarm.
    The problem in my design is in the fail-over, if i configure the reverse-proxy server in a new serverfarm and use the original (web servers) farm as backup it has fail-over, but if the reverse-proxy AND the original serverfarm fail, there is no nice way to get the users on a sorry server.
    I could give the original serverfarms rservers a 'backup standby' server but that won't give the desired effect either.
    For maintance they first take 50% of the servers offline and switch to the other 50% after that, so then users would see a sorry page even if there where operational servers in the farm left.
    The 4710's are running routed mode, and the farms use Sticky Cookie, and also some http URL & Cookie matching is done.
    Anyone have an idea how to build this?

    Hi,
    It need additional testing but as per my understanding if you put the back up in this order then the last backup server will be choosen first.
    In your case it will be like " RSERVER1 >> backup sorry server >> backup web content
    As per the below example:
    I put test 2 as first backup server and test1 as second backup server but if you look at the first part it took rserver test1 as first backup.
    serverfarm host 1313-GIN-GWAP-SDC-80
      rserver RSERVER1
        backup-rserver test1
        inservice
      rserver test1
        inservice standby
      rserver test2
        inservice standby
    regards,
    Ajay Kumar

  • CSS 11501 - Balancing vs. Sorry Server

    Hi,
    I need a little advice.
    I have configured my test CSS box with two services. I enabled keepalives and load balancing with one server having a weight of 5, while the other is set to the default.
    Testing has proven successfull in redirecting requests when the primary server (weight 5) is taken offline. However, when it comes back online, not all requests are sent to it, and some requests still go to the secondary server.
    My question:
    If I want all requests to go to the primary server except in the event it is unavailable, should I configure the secondary server as a Sorry server, and not as a load balanced peer? I would effectively be using the Sorry server as a secondary content server.
    Is this workable? Am I missing something?
    Thanks,
    JM

    JM,
    yes you need the sorryserver option if you don't want traffic to go to your backup.
    Whatever weight option you configure, there will always be a fraction of the traffic going to the backup.
    Gilles.

  • Can the ACE module or 4700 server up webpage.

    Hello.
    Is it possible for the ACE to serve up a web page to a VIP when the VIP is OUTOFSERVICE?
    Any capability for that at all?

    Hi,
    The ACE can redirect it to the server which hosts the web page stating content is unavailable , under maintenance etc but no option to do it on ACE itself. If you like to use the former, please look at the option of sorry server and serverfarm.
    Regards,
    Kanwal

  • Errors in event log of Secondary DPM server protecting replicas on Primary

    Hello again
    I have two DPM servers, one situated on-site (primary) and one situated off-site (secondary). Protection jobs seem to be running correctly on both servers in that the jobs complete and I am able to restore data from the backups. I use the primary server
    to make the initial backups of critical systems and data (Exchange MDB's etc) and the secondary server to backup those replicas off-site in case of primary site loss or DPM system loss.
    The primary server is a physical server and the secondary server is a virtual server. Both DPM servers have their DPM databases stored on one physical SQL server that is in the primary site.
    Basically what is happening is that every day our virtual machines are snapshotted (secondary DPM server included) and everyday the snapshot of the secondary DPM server fails. I see the following to entries in the event log of the secondary server.
    Error 1:
    WARNING
    Source: MSDPM
    Event ID: 955
    The description for Event ID 955 from source MSDPM cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event:
    The consistency check resulted in the following changes to SQL Server Agent schedules: Schedules added: 2 Schedules removed: 2 Schedules updated: 0.  
    Problem Details:
    <ConsistencyCheck><__System><ID>26</ID><Seq>27861</Seq><TimeCreated>22/05/2014 23:01:31</TimeCreated><Source>SchedulerImpl.cs</Source><Line>719</Line><HasError>True</HasError></__System><Tags><JobSchedule
    /></Tags></ConsistencyCheck>
    the message resource is present but the message is not found in the string/message table
    Error 2
    ERROR
    Source: MSDPM
    Event ID: 4212
    The description for Event ID 4212 from source MSDPM cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event:
    DpmWriter service encountered an error during PrepareBackup as more than one component is selected for backup in the same snapshot set.  Select a single DPM replica for backup and try the operation again.
    Problem Details:
    <DpmWriterEvent><__System><ID>30</ID><Seq>7</Seq><TimeCreated>23/05/2014 00:30:45</TimeCreated><Source>d:\btvsts\21011\private\product\tapebackup\dpswriter\vssfunctionality.cpp</Source><Line>438</Line><HasError>True</HasError></__System><DetailedCode>4212</DetailedCode></DpmWriterEvent>
    the message resource is present but the message is not found in the string/message table
    These two events are followed by another event from VMWare Tools everyday
    Error 3:
    WARNING
    Source: VMWare Tools
    Event ID: 1000
    [ warning] [vmvss:vmvss] CVmSnapshotRequestor::CheckWriterStatus():1536: writer DPM Writer in failed state: res = 0x800423f4, err = 0x1, error =
    Has anyone come across this before? Currently I am not quite sure what is going wrong and whether it is actually related to snapshots failing, but I want to try to fix these errors first and see what happens.
    Regards

    Your ar using VMware for Virtualization?
    Are you trying to do an online Backup of the VM, think that will not work?
    One thing i wonder, your have installed second DPM if Site one fails or goes done, but SQL for DPM2 is in Site one? try to move SQL to external site for DPM 2
    Seidl Michael | http://www.techguy.at |
    twitter.com/techguyat | facebook.com/techguyat

  • Replication between Oracle Server and MS SQL Server

    Hello,
    Does anybody know of a well known or reliable software that can do data replication between Oracle Server and Microsoft SQL server.
    I suppose I can write my own version using Heterogenous Services in Oracle but I would like to know if such an automated replication between Oracle and SQL is available commercially.
    Thank you.

    Viacheslav Ostapenko wrote:
    Sorry, Aman,
    I couldn't find any info about replication to MS SQL. Is it possible at all? Could you provide link where we can read about this? It could be very interesting.Sorry Viacheslav, even I couldn't find anything for the same. I am not sure that it can be done or not, I haven't heard anyone in my contact doing so. The only place where I have seen Streams being used around me is within Oracle db only. May be someone else can help if he/she has done it.
    Aman....

  • How to Perform Forced Manual Failover of Availability Group (SQL Server) and WSFC (Windows Server Failover Cluster)

    I have a scenario with the three nodes with server 2012 standard, each running an instance of SQL Server 2012 enterprise, participate in a
    single Windows Server Failover Cluster (WSFC) that spans two data centers.
    If the nodes in the primary data center are unavailable due to data center outage. Then how I can able to access node in the WSFC (Windows Server Failover Cluster) in the secondary disaster recovery data center automatically with some script.
    I want to write script that can be able to check primary data center by pinging some IP after every 5 or 10 minutes.
    If that IP is unable to respond then script can be able to Perform Forced Manual Failover of Availability Group (SQL Server) and WSFC (Windows Server Failover Cluster)
    Can you please guide me for script writing for automatic failover in case of primary datacenter outage?

    please post you question on failover clusters in the cluster forum.  THey will explain how this works and point you at scipts.
    You should also look in the Gallery for cluster management scripts.
    ¯\_(ツ)_/¯

Maybe you are looking for